Im using a Unet network for semantic segmentation. The loss reported by the network is very poor and so is the accuracy which is simple the intersection over union. Even after tens of thousands of iterations the loss does not seem to go below 0.91.
Yet, if I manually see the results the network seems to have segmented everything correctly and as expected.
What may be the reason for this, I know that a pytorch model returns logits and that is what is what is expected by the loss function or is my understanding not accurate?
I get the prediction outputs by applying a nn.Sigmoid on the final convolution layer output but during training this is not applied as, like I said, I thought the loss function expected logits without the Sigmoid.
Why is the loss not a representation of the final results?
Ive tried with nn.BCEWithLogitsLoss and DiceLoss
Thanks