Given groups=1, weight of size 64 4 7 7, expected input[1, 3, 246, 246] to have 4 channels,but got 3
判别网络训练时的代码:dis_real=net_D(dis_input_real2) #经过检查,判别网络的输入通道确定是3,没有问题报错:RuntimeError: Given groups=1, weight of size 64 4 7 7, expected input[4, 3, 246, 246] to have 4 channels, but got 3 channels instead经过检查发现:生成网络指定多gpu训练时,忘记为判别网络指定多gpu训练。解决:discrimi
原创
2021-04-21 23:38:05 ·
1350 阅读 ·
1 评论