class_docstr: CombinedLoss:
      a combionation of loss function
class_docstr_tok: ["CombinedLoss",":","a","combionation","of","loss","function"]
code: def forward(self, input, batch, **kargs):
      loss_dict = {}
      loss_all = 0.0
      for idx, loss_func in enumerate(self.loss_func):
          loss = loss_func(input, batch, **kargs)
          if isinstance(loss, paddle.Tensor):
              loss = {"loss_{}_{}".format(str(loss), idx): loss}
  
          weight = self.loss_weight[idx]
  
          loss = {key: loss[key] * weight for key in loss}
  
          if "loss" in loss:
              loss_all += loss["loss"]
          else:
              loss_all += paddle.add_n(list(loss.values()))
          loss_dict.update(loss)
      loss_dict["loss"] = loss_all
      return loss_dict
  
file_path: PaddleOCR/ppocr/losses/combined_loss.py
imports: import paddle
  import paddle.nn
  from .rec_ctc_loss import CTCLoss
  from .center_loss import CenterLoss
  from .ace_loss import ACELoss
  from .rec_sar_loss import SARLoss
  from .distillation_loss import DistillationCTCLoss, DistillCTCLogits
  from .distillation_loss import DistillationSARLoss, DistillationNRTRLoss
  from .distillation_loss import DistillationDMLLoss, DistillationKLDivLoss, DistillationDKDLoss
  from .distillation_loss import DistillationDistanceLoss, DistillationDBLoss, DistillationDilaDBLoss
  from .distillation_loss import DistillationVQASerTokenLayoutLMLoss, DistillationSERDMLLoss
  from .distillation_loss import DistillationLossFromOutput
  from .distillation_loss import DistillationVQADistanceLoss
label_desc: Use image node_id 2 for calling the CombinedLoss obj's underlying member method code with example usage: obj.forward(input, batch) and returns: loss_dict