mipcandy.common.optim.loss#
Module Contents#
Classes#
API#
- class mipcandy.common.optim.loss.FocalBCEWithLogits(alpha: float, gamma: float, *, reduction: Literal[mean, sum, none] = 'mean')[source]#
Bases:
torch.nn.Module
- class mipcandy.common.optim.loss.Loss[source]#
Bases:
torch.nn.Module- property validation_mode: bool#
- class mipcandy.common.optim.loss.SegmentationLoss(num_classes: int, include_background: bool)[source]#
- class mipcandy.common.optim.loss.DiceCELossWithLogits(num_classes: int, *, lambda_ce: float = 1, lambda_soft_dice: float = 1, smooth: float = 1e-05, include_background: bool = True)[source]#
- class mipcandy.common.optim.loss.DiceBCELossWithLogits(*, lambda_bce: float = 1, lambda_soft_dice: float = 1, smooth: float = 1e-05, min_percentage_per_class: float | None = None)[source]#