-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
One small comment here
MONAI/monai/metrics/meandice.py
Lines 206 to 208 in baa17a8
| if denorm <= 0: | |
| return torch.tensor(1.0, device=y_o.device) | |
| return (2.0 * torch.sum(torch.masked_select(y, y_pred))) / denorm |
if we reach the last "return" statement, it seems to be guaranteed to be 0, so we don't need to calculate it
Originally posted by @myron in #6163 (comment)
docstring example could be improved as well to use either sigmoid or softmax
MONAI/monai/metrics/meandice.py
Line 159 in baa17a8
| score, not_nans = DiceHelper(include_background=False, sigmoid=True, softmax=True)(y_pred, y) |