I currently get constant loss,
I’ve changed the loss function to nn.crossentropyloss() (https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html) and therefore compared the two outputs channels of the last layer of the U-net to the target which is just a single channel binary (0,1) ground truth image. However still same loss being stuck,
The ground truth image has a significant amount of '1’s (white), maybe about 1/20 of the image, as an estimate… so I might be able to rule out class imbalance…
cropping might be useful but I am not sure if there are any other useful methods that will work as well