RuntimeError: mat1 and mat2 shapes cannot be multiplied (32x7 and 784x1024) 报错解决

RuntimeError: mat1 and mat2 shapes cannot be multiplied (32x7 and 784x1024)

运行pytorch时,出现以下报错

错误代码:

出错原因:模型初始化数据报错

解决方案:将784改为7即可

猜你喜欢

转载自blog.csdn.net/Viviane_2022/article/details/127644411
今日推荐