class_docstr: DiceLoss normalized on each instance.
  Input:
      pred: (N, 1, H, W)
      gt: (N, 1, H, W)
      mask: (N, H, W)
  Note: This class assume that input tensors are on gpu,
      while cput computation is required to find union areas.
class_docstr_tok: ["DiceLoss","normalized","on","each","instance",".","Input",":","pred",":","(","N",",","1",",","H",",","W",")","gt",":","(","N",",","1",",","H",",","W",")","mask",":","(","N",",","H",",","W",")","Note",":","This","class","assume","that","input","tensors","are","on","gpu",",","while","cput","computation","is","required","to","find","union","areas","."]
code: def replace_or_add(self, dest, value):
      if dest is None:
          return value
      if value is None:
          return dest
      return dest + value
  
imports: import torch
  import torch.nn
  import numpy
  import cv2
  from scipy import ndimage
label_desc: Use image node_id 4 for calling the InstanceDiceLoss obj's underlying member method code with example usage: obj.replace_or_add(dest, value) and returns: unknown, value, dest