Hi @trypag, I have a question for the line of " numerator = 2 * intersection.sum(0).sum(1).sum(1)". Here you made the summation over the batch first, that doesn’t seem right to me. The dice loss should be calculated over every example and then summing them together. Am I correct?
the summation over batch first in the calculation of numerator and denominator make the codes compute some approximation of dice, but not exactly dice loss.