code: def dice_loss(input, target):
      """Dice loss.
  
      :param input: The input (predicted)
      :param target:  The target (ground truth)
      :returns: the Dice score between 0 and 1.
      """
      eps = 0.0001
  
      iflat = input.view(-1)
      tflat = target.view(-1)
  
      intersection = (iflat * tflat).sum()
      union = iflat.sum() + tflat.sum()
  
      dice = (2.0 * intersection + eps) / (union + eps)
  
      return -dice
  
file_path: medicaltorch/medicaltorch/losses.py
imports: import torch
  from torch.nn import Module
label_desc: Use image node_id 1 for calling a global function with example usage: dice_loss(input, target) and returns: unknown