You haven’t posted the code of your model, but I assume the last layer is a convolution with out_channels=3.
You can add code using three backticks `. It’ll make debugging easier and the search of this forum can find your code, if someone else has this problem.
Are you dealing with gray-scale images in general or did you convert the target to a single channel image?
If your targets are gray-scale, you could just use out_channels=1 in your last conv layer.