Skip to content

Commit

Permalink
Fix bug for accuracy masking
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzLamm committed Jan 3, 2024
1 parent 5373977 commit b4c9e43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/membrain_seg/segmentation/training/metric_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def masked_accuracy(
mask = (
y_gt == ignore_label
if ignore_label is not None
else torch.ones_like(y_gt).bool()
else torch.zeros_like(y_gt).bool()
)
acc = (threshold_function(y_pred, threshold_value=threshold_value) == y_gt).float()
acc[mask] = 0.0
Expand Down

0 comments on commit b4c9e43

Please sign in to comment.