code: def focal_loss(self, pred, gt, m, alpha=0.25, gamma=0.6):
      pos_mask = (gt == 1).float()
      neg_mask = (gt == 0).float()
      mask = alpha * pos_mask * torch.pow(1 - pred.data, gamma) + (
          1 - alpha
      ) * neg_mask * torch.pow(pred.data, gamma)
      l = F.binary_cross_entropy(
          pred, gt, weight=mask, reduction="none"
      )
      loss = torch.sum(l * m) / (self.eps + m.sum())
      loss *= 10
      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 4 for calling the PSS_Loss obj's underlying member method code with example usage: obj.focal_loss(pred, gt, m, alpha, gamma) and returns: loss