RuntimeError: Given groups=1, weight of size 16 1 3 3, expected input[2, 3, 512, 512] to have 1 chan

pytorch训练代码出现这个错误,这个意思就是图像通道不对,要求1通道,给了3通道,去代码里改下就好了,或者改图像通道。

猜你喜欢

转载自blog.csdn.net/qq_20373723/article/details/107978345