赞
踩
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
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。