I am grateful for your reply sir.



 ptrblck:

You don’t need to apply a threshold on the target to calculate the loss.


Yes, you are right. I am not applying a threshold on the target to calculate the loss.



 ptrblck:

Could you explain a bit how you are feeding the target to the network?


I am feeding the target directly without  considering any threshold.
Am I supposed to apply a threshold to the target before feeding into the network?  I have noticed that the loss could decrease normally without anything strange. However, The testing results were very bad ( dice = 0.002).
Please, I would like to know when and how should the threshold be applied
Thank you for your time and patience