标签: 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 显示,为什么?