DiceLoss
- class easypl.losses.segmentation.diceloss.DiceLoss(weight: Optional[Tensor] = None, ignore_index: Optional[int] = None, **kwargs)
Dice loss, need one hot encode input. Taken from: https://github.com/hubutui/DiceLoss-PyTorch/blob/master/loss.py. Inputs must be a tensor of shape [N, C, *].
- weight
An array of shape [num_classes,].
- Type
Optional[torch.Tensor]
- ignore_index
Class index to ignore.
- Type
Optional[int]
- kwargs
Additional arguments.
- Returns
Loss value
- Return type
torch.Tensor