hello everyone. I am trying to create a segmentation network (Unet) but I get confused a little.
my network output dimension is y_pread >>(3,960,960) and also I have labels for my outputs with the same dimension y_real>>(3,960,960). I know that I can get one channel instead of three-channel and change the RGB image into a grayscale it means  y_pread >>(1,960,960)  and  y_real >>(1,960,960)
but the problem is a crossentropy loss or the other loss such as BCEloss or the other could not support image or 2 dimensions in a loss.
what should I do for my Unet loss function???