RuntimeError: The size of tensor a (40) must match the size of tensor b (41) at non-singleton dimens

RuntimeError: The size of tensor a (40) must match the size of tensor b (41) at non-singleton dimension 3

此类还是维度问题,建议尝试解决方案:

把最后一轮训练跳过就好了

原文地址:https://www.cnblogs.com/abc23/p/14383005.html