Hi Niranjan!
My answer is not specific to UNet, and I haven’t looked at your code
or your particular use case.



 Niranjan_Rao:

Should I be using a softmax layer for getting class probabilities while using Cross-Entropy Loss.


No.  CrossEntropyLoss has, in effect, softmax() built in.  So you
want to feed into it the raw-score logits output by your model.


How do I convert Logits to Probabilities.


You usually don’t actually need the probabilities.  But if you do, you
convert logits to probabilities by passing them through softmax().
Best.
K. Frank