Skip to content

Commit

Permalink
fix ignore to dice (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdci authored Dec 28, 2022
1 parent 24772f4 commit f460027
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/super_gradients/training/losses/dice_ce_edge_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(
self.binary_dice = BinaryDiceLoss(apply_sigmoid=True)

self.ce_edge = MaskAttentionLoss(criterion=nn.CrossEntropyLoss(reduction="none", ignore_index=ignore_index), loss_weights=ce_edge_weights)
self.dice_loss = DiceLoss(apply_softmax=True, ignore_index=ignore_index)
self.dice_loss = DiceLoss(apply_softmax=True, ignore_index=None if ignore_index < 0 else ignore_index)

@property
def component_names(self):
Expand Down

0 comments on commit f460027

Please sign in to comment.