Skip to content

Commit 7e769e0

Browse files
committed
Explicitly set reduction
1 parent cf50cd0 commit 7e769e0

File tree

1 file changed

+1
-0
lines changed
  • segmentation_models_pytorch/losses

1 file changed

+1
-0
lines changed

segmentation_models_pytorch/losses/focal.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def __init__(
4545

4646
self.mode = mode
4747
self.ignore_index = ignore_index
48+
self.reduction = reduction
4849
self.focal_loss_fn = partial(
4950
focal_loss_with_logits,
5051
alpha=alpha,

0 commit comments

Comments
 (0)