```py
class FocalDiceLoss(nn.Module):
def __init__(
self, mode: str = "multiclass", ignore_index: int = 0, normalized: bool = False
):
super().__init__()
self.focal_loss = smp.losses.FocalLoss(
mode=mode, ignore_index=ignore_index, normalized=normalized
)
self.dice_loss = smp.losses.DiceLoss(mode=mode, ignore_index=ignore_index)
def forward(self, preds, targets):
print(preds) # None
print(self.focal_loss(preds, targets))
print(self.dice_loss(preds, targets))
return self.focal_loss(preds, targets) + self.dice_loss(preds, targets)
```
No, it's not. For questions about the baseline, please contact the developers of the baseline.
Posted by: rhaensch @ Jan. 17, 2022, 3:33 p.m.OK
Posted by: lanling @ Jan. 17, 2022, 3:37 p.m.