仅作为记录,大佬请跳过。

今天博主在跑大佬博主的pytorch cnn分类mnist数据集的程序——大佬博主文章(第四个网络)

出现问题:

经过尝试,发现是在定义网络中的问题


将x = x.view(128,-1)改为x = x.view(-1,64*3*3)即可。

最后,再次感谢强大的大佬博主

mat1 and mat2 shapes cannot be multiplied (128x432 and 576x64)的解决相关推荐

  1. RuntimeError: mat1 and mat2 shapes cannot be multiplied (1024x1 and 1024x3)

    RuntimeError: mat1 and mat2 shapes cannot be multiplied (1024x1 and 1024x3) 前言:在学习pytorch 搭建神经网络的时候, ...

  2. RuntimeError: mat1 and mat2 shapes cannot be multiplied

    RuntimeError: mat1 and mat2 shapes cannot be multiplied RuntimeError: mat1 and mat2 shapes cannot be ...

  3. 解决:RuntimeError: mat1 and mat2 shapes cannot be multiplied (8x256 and 8x256)维度不匹配问题

    在设计网络是,前面几层是去噪网络,后边几层是分类网络,因为之前没有接触过分类任务,对全连接层输入维度不太理解,出现错误RuntimeError: mat1 and mat2 shapes cannot ...

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

    RuntimeError: mat1 and mat2 shapes cannot be multiplied (32x7 and 784x1024) 运行pytorch时,出现以下报错: 错误代码: ...

  5. pytorch报错:RuntimeError: mat1 and mat2 shapes cannot be multiplied (64x2500 and 3020x1600)

    相信同学们在刚接触深度学习的时候老会遇到类似的问题: 这个其实就是卷积层到全连接层之间的参数数量不对应的问题 卷积层的的输出结果是64*2500的矩阵,那么全连接层的第一个第一层的就应该是:2500* ...

  6. AI绘画(sd webui)报错mat1 and mat2 shapes cannot be multiplied的处理

    问题描述 在用webui转换游戏图标的风格时,使用controlnet固定图标样式,运行报错:RuntimeError: mat1 and mat2 shapes cannot be multipli ...

  7. RuntimeError: mat1 and mat2 shapes cannot be multiplied (3584x7 and 25088x4096)

    RuntimeError: mat1 and mat2 shapes cannot be multiplied (3584x7 and 25088x4096) 使用VGG19提取图像特征时出现该问题 ...

  8. Pytorch vgg16 实现CIFAR10数据集分类 以及RuntimeError: mat1 and mat2 shapes cannot be multiplied终极详解

    最近从tensorflow转战pytorch,今天又遇到了了一个大坑:RuntimeError: mat1 and mat2 shapes cannot be multiplied,网上的结果大都模模 ...

  9. RuntimeError mat1 and mat2 shapes cannot be multiplied

    详细显示如下 x = self.fc(x) File "D:\Python36\lib\site-packages\torch\nn\modules\module.py", lin ...

最新文章

  1. 【内网福音】如何离线部署Rancher
  2. R语言可视化绘制基本图形
  3. mac电脑sublime text3安装pretty json插件
  4. 一个利用System.gc和finalize研究Java垃圾回收机制的练习
  5. 罗德里格斯(Rodrigues)旋转向量与矩阵的变换
  6. MFC中CString.Format的用法
  7. 将mysql中的数据库表导出和导入
  8. 《游戏之旅-我的编程感悟》读书笔记
  9. TF-tf.keras.layers.Dropout
  10. Linux常用shell脚本
  11. UE4学习-初识虚幻引擎(下载、安装、重定向问题、安装引擎、启动)
  12. 杂项:grunt-tmod
  13. apple pencil_如何检查Apple Pencil的电池电量
  14. 清华数为DWF低代码平台使用感悟
  15. 为测试者布道,腾讯互娱总监魏学峰分享手游研测干货
  16. ClickHouse查询语句详解
  17. 数字高程(移动曲面)拟合(C++)
  18. 企业抖音账号流量提升3步法,新号也能过百万播放量
  19. 菜鸟哥玩蓝牙Ble4.0系列 ESP32初玩篇⑤ GATT —— 连接数据通信之Server模式
  20. 了解IP地址及如何设置IP地址

热门文章

  1. Python 中 'unicodeescape' codec can't decode bytes in position XXX: trun错误解决方案
  2. ps图案叠加怎么添加图案?Photoshop图案如何使用?
  3. mysql怎么放入图片_怎么将图片添加到mysql中
  4. 用上就不会停下的效率利器—Automator
  5. 欢迎使用CSDN-markdown编辑器123213
  6. Mac:was built for newer OSX version (10.15) than being linked (10.14)
  7. utc时间 单位换算_UTC转换本地时间
  8. jpress连接数据库mysql_win10+java+mysql+tomcat+jpress环境搭建与部署
  9. 如何使用 Firebase 建立短網址?
  10. Frenet坐标系与Cartesian坐标系互转(二):Python代码函数实现