Could you explain a bit more how your dice loss is currently working?
I’m not sure to understand it completely.
Are you passing the logits and targets for each class into the function?
If not, how are the logits and targets correspond to each other?
I assume logits has a shape of [batch_size, nb_classes, h, w], while targets is [batch_size, h, w]. Is that correct?