class_docstr: Implements the dice loss function.
  
  Args:
      ignore_index (int64): Specifies a target value that is ignored
          and does not contribute to the input gradient. Default ``255``.
      smooth (float32): laplace smoothing,
          to smooth dice loss and accelerate convergence. following:
          https://github.com/pytorch/pytorch/issues/1249#issuecomment-337999895
code: def __init__(self, sigmoid_norm=True, weight=None):
      super(DiceLoss, self).__init__()
      self.weight = weight
      self.eps = 1e-5
      if sigmoid_norm:
          self.norm = nn.Sigmoid()
      else:
          self.norm = nn.Softmax(axis=1)
  
file_path: PaddleSeg/contrib/MedicalSeg/medicalseg/models/losses/dice_loss.py
imports: import paddle
  from paddle import nn
  import paddle.nn.functional
  from medicalseg.models.losses import flatten
  from medicalseg.cvlibs import manager
label_desc: Use image node_id 1 to create a new DiceLoss object from inherited base classes: nn with example: obj = DiceLoss(sigmoid_norm, weight)