code: def forward(self, predicts, batch):
      predict = predicts["predict"]
      word_predict = predicts["word_out"]
      gsrm_predict = predicts["gsrm_out"]
      label = batch[1]
  
      casted_label = paddle.cast(x=label, dtype="int64")
      casted_label = paddle.reshape(x=casted_label, shape=[-1, 1])
  
      cost_word = self.loss_func(word_predict, label=casted_label)
      cost_gsrm = self.loss_func(gsrm_predict, label=casted_label)
      cost_vsfd = self.loss_func(predict, label=casted_label)
  
      cost_word = paddle.reshape(x=paddle.sum(cost_word), shape=[1])
      cost_gsrm = paddle.reshape(x=paddle.sum(cost_gsrm), shape=[1])
      cost_vsfd = paddle.reshape(x=paddle.sum(cost_vsfd), shape=[1])
  
      sum_cost = cost_word * 3.0 + cost_vsfd + cost_gsrm * 0.15
  
      return {
          "loss": sum_cost,
          "word_loss": cost_word,
          "img_loss": cost_vsfd,
      }
  
file_path: PaddleOCR/ppocr/losses/rec_srn_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 2 for calling the SRNLoss obj's underlying member method code with example usage: obj.forward(predicts, batch) and returns: dict