class_docstr: Loss function from https://arxiv.org/abs/1707.03237,
  where iou computation is introduced heatmap manner to measure the
  diversity bwtween tow heatmaps.
class_docstr_tok: ["Loss","function","from","https",":","\/\/arxiv.org\/abs\/1707.03237",",","where","iou","computation","is","introduced","heatmap","manner","to","measure","the","diversity","bwtween","tow","heatmaps","."]
docstr: pred: one or two heatmaps of shape (N, 1, H, W),
      the losses of tow heatmaps are added together.
  gt: (N, 1, H, W)
  mask: (N, H, W)
docstr_tok: ["pred",":","one","or","two","heatmaps","of","shape","(","N",",","1",",","H",",","W",")",",","the","losses","of","tow","heatmaps","are","added","together",".","gt",":","(","N",",","1",",","H",",","W",")","mask",":","(","N",",","H",",","W",")"]
code: def forward(self, pred: paddle.Tensor, gt, mask, weights=None):
      """
      pred: one or two heatmaps of shape (N, 1, H, W),
          the losses of tow heatmaps are added together.
      gt: (N, 1, H, W)
      mask: (N, H, W)
      """
      return self._compute(pred, gt, mask, weights)
  
file_path: PaddleOCR/benchmark/PaddleOCR_DBNet/models/losses/basic_loss.py
imports: import paddle
  import paddle.nn
label_desc: Use image node_id 2 for calling the DiceLoss obj's underlying member method code with example usage: obj.forward(pred, gt, mask, weights) and returns: self