Skip to content

Commit 13c3d0e

Browse files
authored
Removed unused parameter min_percentage_per_class from soft_dice_coefficient. (#213) (#214)
1 parent acefee4 commit 13c3d0e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

mipcandy/common/optim/loss.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ def _forward(self, outputs: torch.Tensor, labels: torch.Tensor) -> tuple[torch.T
9696
outputs = outputs.sigmoid()
9797
labels = labels.float()
9898
bce = nn.functional.binary_cross_entropy(outputs, labels)
99-
soft_dice = soft_dice_coefficient(outputs, labels, smooth=self.smooth,
100-
min_percentage_per_class=self.min_percentage_per_class)
99+
soft_dice = soft_dice_coefficient(outputs, labels, smooth=self.smooth)
101100
metrics = {"soft dice": soft_dice.item(), "bce loss": bce.item()}
102101
c = self.lambda_bce * bce + self.lambda_soft_dice * (1 - soft_dice)
103102
return c, metrics

0 commit comments

Comments
 (0)