RuntimeError: The size of tensor a (4) must match the size of tensor b (2) at non-singleton dimensio

RuntimeError: The size of tensor a (4) must match the size of tensor b (2) at non-singleton dimension 1

主要原因是数据维度不一致,

RuntimeError: The size of tensor a (4) must match the size of tensor b (2) at non-singleton dimensio_第1张图片

解决方案:

提示:这里填写该问题的具体解决方案:

这个问题, 把这个veiew(1,4)删除就可以了

你可能感兴趣的:(bug,机器学习)