目前在学习pytorch,自己写了一些例子,在这里记录下来一些报错及总结 1. RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'weight' 详细报错信息 Traceback (most recent call last): File , in <module> outputs = net(inputs) File ,
参考:https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#sphx-glr-beginner-blitz-cifar10-tutorial-py TRAINING A CLASSIFIER 到这里,你已经知道怎么定义神经网络,计算损失和更新网络的权重 现在你应该考虑: What about data? 通常,当你必须要处理一些图片.文本.音频或视频数据时,你可以使用标准的python包去下载数据到一个numpy数组