这里的话,笔者进行了代码调试,发现问题出现在W1,b1,W2,b2的代码块部分,如果你和笔者一样,开始就把W1,b1复制粘贴给W2,b2,那么请检查一下b2的 参数,为Outputs而不是Hiddens。更正后即可运行程序!
(觉得有用,麻烦点个赞再走吧)
关于李沐深度学习The size of tensor a (10) must match the size of tensor b (256) at non-singleton dimension 1
最新推荐文章于 2025-03-21 11:08:40 发布