
pytorch
Zayn~
WUST->JLU->JD
不是因为看到光才努力,而是只有不断努力,才有机会追的上光~
展开
-
RuntimeError: Given groups=1, weight of size 32 3 3 3, expected input[1, 224, 224, 3] to have 3 chan
RuntimeError: Given groups=1, weight of size 32 3 3 3, expected input[1, 224, 224, 3] to have 3 channels, but got 224 channels instead问题。我的代码出现这个问题是因为我的input是batchsize*size*size*channels,而model所需要的输入是batchsize*channels*size*size的形式,因此只需要 img_new= np.t..原创 2020-06-23 15:14:56 · 12181 阅读 · 0 评论 -
RuntimeError: Input type (torch.cuda.ByteTensor) and weight type (torch.cuda.FloatTensor) should be
RuntimeError: Input type (torch.cuda.ByteTensor) and weight type (torch.cuda.FloatTensor) should be the same如问题所示,你的输入的类型是字节型的tensor,而加载的权重的类型是float类型的tensor,需要将字节型的tensor转化为float型的tensor。eg:我的程序的部分截图,仅供参考。我当时是没有第18行的转换出现了该问题。...原创 2020-06-23 15:07:43 · 14585 阅读 · 0 评论 -
CUDA error: device-side assert triggered 问题
CUDA error: device-side assert triggered有两种原因:1RuntimeError: Given groups=1, weight of size 32 3 3 3, expected input[1, 224, 224, 3] to have 3 chan原创 2020-06-28 18:39:52 · 1788 阅读 · 0 评论 -
python.exe-无法找到入口
当我在Jupiter Notebook上执行import torchvision的时候,程序出现了如下错误:我尝试了更改trochvision版本以及用conda还原到之前的版本都没有用,直到我看到了这篇博客:https://blog.youkuaiyun.com/qq_40108803/article/details/104913030?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.none原创 2020-06-01 23:36:35 · 4473 阅读 · 1 评论