code: def forward(
      self,
      region_scores_label,
      affinity_socres_label,
      region_scores_pre,
      affinity_scores_pre,
      mask,
      neg_rto,
      n_min_neg,
  ):
      loss_fn = torch.nn.MSELoss(reduce=False, size_average=False)
      assert (
          region_scores_label.size() == region_scores_pre.size()
          and affinity_socres_label.size() == affinity_scores_pre.size()
      )
      loss1 = loss_fn(region_scores_pre, region_scores_label)
      loss2 = loss_fn(affinity_scores_pre, affinity_socres_label)
  
      loss_region = torch.mul(loss1, mask)
      loss_affinity = torch.mul(loss2, mask)
  
      char_loss = self.batch_image_loss(
          loss_region, region_scores_label, neg_rto, n_min_neg
      )
      affi_loss = self.batch_image_loss(
          loss_affinity, affinity_socres_label, neg_rto, n_min_neg
      )
      return char_loss + affi_loss
  
file_path: EasyOCR/trainer/craft/loss/mseloss.py
imports: import torch
  import torch.nn
label_desc: Use image node_id 3 for calling the Maploss_v2 obj's underlying member method code with example usage: obj.forward(region_scores_label, affinity_socres_label, region_scores_pre, affinity_scores_pre, mask, neg_rto, n_min_neg) and returns: unknown