为什么 pytorch 可以轻松打印 dtype?

时间:2021-07-27 08:19:42

标签: python deep-learning pytorch

import torch 
import numpy 
torch.tensor([1,2])
Out[4]: tensor([1, 2])
torch.tensor(numpy.array([1,2]))
Out[5]: tensor([1, 2], dtype=torch.int32)

Out4 不显示 dtype,而 Out5 显示,为什么?

0 个答案:

没有答案
相关问题