diff --git a/models/meta_arch/binary_seg.py b/models/meta_arch/binary_seg.py index 801878d..0ff12b8 100644 --- a/models/meta_arch/binary_seg.py +++ b/models/meta_arch/binary_seg.py @@ -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