segmentation_models_pytorch.losses.dice — Segmentation Models ...
smp.readthedocs.io › losses › diceBy default, all channels are included. log_loss: If True, loss computed as `- log (dice_coeff)`, otherwise `1 - dice_coeff` from_logits: If True, assumes input is raw logits smooth: Smoothness constant for dice coefficient (a) ignore_index: Label that indicates ignored pixels (does not contribute to loss) eps: A small epsilon for numerical stability to avoid zero division error (denominator will be always greater or equal to eps) Shape - **y_pred** - torch.Tensor of shape (N, C, H, W) - ...