The documentation for DiceLoss says (my bold):
Compute average Dice loss between two tensors. It can support both multi-classes and multi-labels tasks. Input logits input (BNHW[D] where N is number of classes) is compared with ground truth target (BNHW[D]). Axis N of input is expected to have logit predictions for each class rather than being image channels, while the same axis of target can be 1 or N (one-hot format)...
The term "logit" here doesn't seem to match how DiceLoss actually works; it expects class probabilities and not logit values. That can change for one of the inputs if the parameters sigmoid or softmax are set to True, but those parameters are False by default.
The documentation for
DiceLosssays (my bold):The term "logit" here doesn't seem to match how
DiceLossactually works; it expects class probabilities and not logit values. That can change for one of the inputs if the parameterssigmoidorsoftmaxare set toTrue, but those parameters areFalseby default.