首页 Paddle框架 帖子详情
mnist运行错误
收藏
快速回复
Paddle框架 问答深度学习模型训练 1408 1
mnist运行错误
收藏
快速回复
Paddle框架 问答深度学习模型训练 1408 1

报错:ValueError: (InvalidArgument) The fisrt matrix width should be same as second matrix height,but received fisrt matrix width 784, second matrix height 785

解决:将原文档中785改成784

mnist = paddle.nn.Sequential(
paddle.nn.Flatten(),
paddle.nn.Linear(785, 512),
paddle.nn.ReLU(),
paddle.nn.Dropout(0.2),
paddle.nn.Linear(512, 10)
)

0
收藏
回复
全部评论(1)
时间顺序
8
838341370
#2 回复于2021-04

(InvalidArgument) The fisrt matrix width should be same as second matrix height,but received fisrt matrix width 5760, second matrix height 46080
[Hint: Expected dim_a.width_ == dim_b.height_, but received dim_a.width_:5760 != dim_b.height_:46080.] (at /paddle/paddle/fluid/operators/math/blas_impl.h:1170)
[operator < matmul > error]

我这个怎么办

 

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户