We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3c2570 commit 912235eCopy full SHA for 912235e
monai/losses/unified_focal_loss.py
@@ -208,6 +208,8 @@ def __init__(
208
self.gamma = gamma
209
self.delta = delta
210
self.weight: float = weight
211
+ self.include_background: bool = include_background
212
+ self.use_softmax = use_softmax
213
self.asy_focal_loss = AsymmetricFocalLoss(
214
to_onehot_y=self.to_onehot_y,
215
gamma=self.gamma,
@@ -222,8 +224,6 @@ def __init__(
222
224
include_background=self.include_background,
223
225
reduction=LossReduction.NONE,
226
)
- self.include_background: bool = include_background
- self.use_softmax = use_softmax
227
228
# TODO: Implement this function to support multiple classes segmentation
229
def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor:
0 commit comments