- 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])
推薦閱讀
- Intel FPGA/CPLD設計(基礎篇)
- Learning AngularJS Animations
- 基于ARM的嵌入式系統和物聯網開發
- OpenGL Game Development By Example
- 單片機系統設計與開發教程
- 筆記本電腦維修實踐教程
- 單片機技術及應用
- 微服務實戰(Dubbox +Spring Boot+Docker)
- 微控制器的應用
- UML精粹:標準對象建模語言簡明指南(第3版)
- 基于S5PV210處理器的嵌入式開發完全攻略
- The Machine Learning Workshop
- 零基礎輕松學修電腦主板
- Machine Learning Projects for Mobile Applications
- INSTANT Cinema 4D Starter