image.png1543×426 93.1 KB

I changed the code as shown in this figure but I got the following error:

File “/home/Special/h_106/anaconda3/lib/python3.6/site-packages/torch/nn/modules/conv.py”, line 301, in forward
self.padding, self.dilation, self.groups)
RuntimeError: Given groups=1, weight of size [512, 256, 4, 4], expected input[4, 6, 256, 256] to have 256 channels, but got 6 channels instead

I have set  input_nc=6 ,  output_nc=3  and  batch_size=4 .
Any suggestions?