赞
踩
import torch # Number t1 = torch.tensor(1.) t1
tensor(1.)
t1.dtype
torch.float32
t1.shape
torch.Size([])
# Vector t2 = torch.tensor([1., 2, 3, 4]) t2
tensor([1., 2., 3., 4.])
t2.dty