- Deep Learning with PyTorch
- Vishnu Subramanian
- 56字
- 2021-06-24 19:16:23
Scalar (0-D tensors)
A tensor containing only one element is called a scalar. It will generally be of type FloatTensor or LongTensor. At the time of writing, PyTorch does not have a special tensor with zero dimensions. So, we use a one-dimension tensor with one element, as follows:
x = torch.rand(10)
x.size()
Output - torch.Size([10])
推薦閱讀
- 顯卡維修知識精解
- Augmented Reality with Kinect
- 深入淺出SSD:固態存儲核心技術、原理與實戰
- AMD FPGA設計優化寶典:面向Vivado/SystemVerilog
- 筆記本電腦維修不是事兒(第2版)
- 分布式系統與一致性
- The Deep Learning with Keras Workshop
- STM32嵌入式技術應用開發全案例實踐
- Spring Cloud微服務架構實戰
- Hands-On Artificial Intelligence for Banking
- 無蘋果不生活:OS X Mountain Lion 隨身寶典
- LPC1100系列處理器原理及應用
- 單片機技術及應用
- Java Deep Learning Cookbook
- Practical Artificial Intelligence and Blockchain