docstr_tok: []
code: def __init__(
      self, apply_softmax=True, batch_dice=False, do_bg=True, smooth=1.0
  ):
      """ """
      super(SoftDiceLoss, self).__init__()
  
      self.do_bg = do_bg
      self.batch_dice = batch_dice
      self.apply_softmax = apply_softmax
      self.smooth = smooth
  
file_path: PaddleSeg/contrib/MedicalSeg/nnunet/losses/dice_and_ce_loss.py
imports: import numpy
  import paddle
  from paddle import nn
  import paddle.nn.functional
  from medicalseg.cvlibs import manager
label_desc: Use image node_id 1 to create a new SoftDiceLoss object from inherited base classes: nn with example: obj = SoftDiceLoss(apply_softmax, batch_dice, do_bg, smooth)