ValueError: Expected more than 1 value per channel when training, got input size torch.Size

ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 512, 1, 1])

在调试别的语义分割模型时,出现了这个错误。

解决方案:
我们需要做的就是更改batch的值,将1改成别的数字。

猜你喜欢

转载自blog.csdn.net/qq_36321330/article/details/108954588