-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Describe the bug
the error messages and docstring should be consistent
MONAI/monai/losses/contrastive.py
Lines 89 to 91 in a7bc4a3
if self.reduction == LossReduction.SUM.value: | |
return torch.sum(loss_partial) / (2 * self.batch_size) | |
raise ValueError(f"Unsupported reduction: {self.reduction}, " f'available options are ["mean", "sum", "none"].') |
MONAI/monai/losses/contrastive.py
Line 58 in a7bc4a3
ValueError: When ``self.reduction`` is not one of ["sum", "none"]. |
Expected behavior
implementing the option reduction="none"
?
Metadata
Metadata
Assignees
Labels
No labels