赞
踩
Torch定义了七种CPU tensor类型和八种GPU tensor类型:
CPU tensor
32-bit floating point: torch.FloatTensor
64-bit floating point: torch.DoubleTensor
8-bit integer (unsigned): torch.ByteTensor
8-bit integer (signed): torch.CharTensor
16-bit integer (signed) : torch.ShortTensor
32-bit integer (signed) : torch.IntTensor
64-bit integer (signed) : torch.LongTensor
GPU tensor
32-bit floating point: torch.cuda.FloatTensor
64-bit floating point: torch.cuda.DoubleTensor
16-bit floating point: torch.cuda.HalfTensor
8-bit integer (unsigned): torch.cuda.ByteTensor
8-bit integer (signed): torch.cuda.CharTensor
16-bit integer (signed) : torch.cuda.ShortTensor
32-bit integer (signed) : torch.cuda.IntTensor
64-bit integer (signed) : torch.cuda.LongTensor
torch.Tensor是默认类型torch.FloatTensor
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。