当前位置:网站首页>The difference between torch.tensor and torch.tensor
The difference between torch.tensor and torch.tensor
2022-07-29 08:07:00 【00000cj】
Official explanation
torch.Tensor is an alias for the default tensor type (torch.FloatTensor).
namely torch.Tensor The default is float32 type , And cannot be changed during initialization .
and torch.tensor The data type will be automatically assigned according to the initial value , And you can specify the data type during initialization .
x = torch.Tensor([1, 2, 3])
y = torch.tensor([1, 2, 3])
z = torch.tensor([1, 2, 3], dtype=torch.float16)
print(x.dtype) # torch.float32
print(y.dtype) # torch.int64
print(z.dtype) # torch.float16Reference resources
Difference between torch.tensor and torch.Tensor - PyTorch Forums
边栏推荐
- Greenplus enterprise deployment
- 随机抽奖转盘微信小程序项目源码
- [beauty of software engineering - column notes] 26 | continuous delivery: how to release new versions to the production environment at any time?
- postman接口测试|js脚本之阻塞休眠和非阻塞休眠
- (视频+图文)机器学习入门系列-第5章 机器学习实践
- Character shader exercise
- Implementation of simple cubecap+fresnel shader in unity
- Dp1332e multi protocol highly integrated contactless read-write chip
- The software package is set to - > Yum source
- Tcp/ip five layer reference model and corresponding typical devices and IPv6
猜你喜欢

Qt/PyQt 窗口类型与窗口标志

My entrepreneurial neighbors
![[cryoEM] Introduction to FSC, Fourier shell correlation](/img/01/6a4f6041444abfd1d3ca7e0c14b524.png)
[cryoEM] Introduction to FSC, Fourier shell correlation

Keyboard processing in jetpack compose

Unity多人联机框架Mirro学习记录(一)

Simplefoc parameter adjustment 1-torque control
![[introduction to cryoelectron microscopy] Caltech open class course notes part 3:image formation](/img/7b/cbd9e3b6d72155613e53ffdd06c5cd.png)
[introduction to cryoelectron microscopy] Caltech open class course notes part 3:image formation

Effective learning of medical image segmentation annotation based on noise pseudo tags and adversarial learning

Implementation of simple matcap+fresnel shader in unity

Data unit: bit, byte, word, word length
随机推荐
Measured waveform of boot capacitor short circuit and open circuit of buck circuit
【NOI模拟赛】计算几何(凸包,暴力,并查集)
[robomaster] control RM motor from scratch (2) -can communication principle and electric regulation communication protocol
[skill accumulation] common expressions when writing emails
An optimal buffer management scheme with dynamic thresholds paper summary
The computer system has no standard tcp/ip port processing operations
Simplefoc parameter adjustment 1-torque control
Character shader exercise
STM32 serial port garbled
Simplefoc parameter adjustment 3-pid parameter setting strategy
Unity多人联机框架Mirro学习记录(一)
随机抽奖转盘微信小程序项目源码
[cryoelectron microscope] relion4.0 pipeline command summary (self use)
阿里巴巴政委体系-第四章、政委建在连队上
Actual measurement of boot and pH pins of buck circuit
[密码学实验] 0x00 安装NTL库
UE4 principle and difference between skylight and reflecting sphere
BiSeNet v2
Some simple uses of crawler requests Library
Basic introduction to pod