mnist运行错误
收藏
报错: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
收藏
请登录后评论
(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]
我这个怎么办