code: def __init__(
      self, mode="LF_1", weight_res=0.5, weight_mas=0.5, **kwargs
  ):
      super(VLLoss, self).__init__()
      self.loss_func = paddle.nn.loss.CrossEntropyLoss(reduction="mean")
      assert mode in ["LF_1", "LF_2", "LA"]
      self.mode = mode
      self.weight_res = weight_res
      self.weight_mas = weight_mas
  
file_path: PaddleOCR/ppocr/losses/rec_vl_loss.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from paddle import nn
label_desc: Use image node_id 1 to create a new VLLoss object from inherited base classes: nn with example: obj = VLLoss(mode, weight_res, weight_mas)