code: def forward(self, pred, gt, mask, gt_type="shrink"):
      if gt_type == "shrink":
          loss = self.get_loss(pred, gt, mask)
          return loss
      elif gt_type == "pss":
          loss = self.get_loss(pred, gt[:, :4, :, :], mask)
          g_g = gt[:, 4, :, :]
          g_p, _ = torch.max(pred, 1)
          loss += self.criterion(g_p, g_g, mask)
          return loss
      elif gt_type == "both":
          pss_loss = self.get_loss(
              pred[:, :4, :, :], gt[:, :4, :, :], mask
          )
          g_g = gt[:, 4, :, :]
          g_p, _ = torch.max(pred, 1)
          pss_loss += self.criterion(g_p, g_g, mask)
          shrink_loss = self.criterion(
              pred[:, 4, :, :], gt[:, 5, :, :], mask
          )
          return pss_loss, shrink_loss
      else:
          return NotImplementedError(
              "gt_type [%s] is not implemented", gt_type
          )
  
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 10 for calling the PSS_Loss obj's underlying member method code with example usage: obj.forward(pred, gt, mask, gt_type) and returns: loss, loss, pss_loss,  shrink_loss, NotImplementedError