lee-zq / 3DUNet-Pytorch

3DUNet implemented with pytorch
484 stars 108 forks source link

Dice loss problem #31

Open nmhlog opened 2 years ago

nmhlog commented 2 years ago

Hi, thank you for your amazing work. I thing there is some problem for dice loss, especially when u calculate with weight class. Regrading this paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8393549/

the weight should be apply to both numerator and de numerator.

I have try your dice loss code and loss give negative value. I thing this problem cause by the values of numerator is too high.