code: def dice_loss(self, pred, gt, m):
      intersection = torch.sum(pred * gt * m)
      union = torch.sum(pred * m) + torch.sum(gt * m) + self.eps
      loss = 1 - 2.0 * intersection / union
      if loss > 1:
          print(intersection, union)
      return loss
  
file_path: EasyOCR/easyocr/DBNet/decoders/pss_loss.py
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the PSS_Loss obj's underlying member method code with example usage: obj.dice_loss(pred, gt, m) and returns: loss