其他分享
首页 > 其他分享> > 搭建神经网络

搭建神经网络

作者:互联网

PyTorch是使用GPU和CPU优化的深度学习张量库。这篇博客记录如何使用pyTorch初步搭建神经网络。

一、搭建神经网络

1.1 基本概念

Data tyoe dtype CPU tensor GPU tensor
32-bit floating point torch.float32 or torch.float torch.FloatTensor torch.cuda.FloatTensor
64-bit floating point torch.float64 or torch.double torch.DoubleTensor torch.cuda.DoubleTensor
16-bit floating point torch.float16 or torch.half N/A torch.cuda.HalfTensor
8-bit integer (unsigned) torch.uint8 torch.ByteTensor torch.cuda.ByteTensor
8-bit integer (signed) torch.int8 torch.CharTensor torch.cuda.CharTensor
16-bit integer (signed) torch.int16 or torch.short torch.ShortTensor torch.cuda.ShortTensor
32-bit integer (signed) torch.int32 or torch.int torch.IntTensor torch.cuda.IntTensor
64-bit integer (signed) torch.int64 or torch.long torch.LongTensor torch.cuda.LongTensor

标签:FloatTensor,torch,张量,神经网络,cuda,integer,bit,搭建
来源: https://www.cnblogs.com/lyszyl/p/12116710.html