-
| Hi, I used monai DiceLoss to implement my segmentation task. However, the dice loss value is 0.8, while dice score is 0.7. This is weird. I think there must something be wrong. So I wanna know how to use DiceLoss for multiple classes 2D segmentation task? The backbone will yield a tensor with shape [B, C, H, W], and the corresponding mask tensor with a shape [B, H, W]. I initialized MONAI DiceLoss, DiceMetric and trained my model with the following codes:  | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
| You are right. The   | 
Beta Was this translation helpful? Give feedback.
You are right. The
dice lossshould be1 - dice score. Consider this code that does fix some minor problems in your code: