Skip to content

Commit

Permalink
Show what to do next
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanklut committed Dec 9, 2024
1 parent f4ea105 commit 48adc42
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions models/meta_arch/binary_seg.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def losses(self, predictions, targets):
align_corners=False,
)

# TODO BCE cannot handle ignore values, need to implement a custom loss
loss = F.binary_cross_entropy_with_logits(predictions, targets.float(), reduction="mean")
losses = {"loss_bce_seg": loss * self.loss_weight}
return losses

0 comments on commit 48adc42

Please sign in to comment.