code: def __init__(
      self,
      weight=None,
      size_average=True,
      ignore_index=-100,
      sequence_normalize=False,
      sample_normalize=True,
      **kwargs,
  ):
      super(AsterLoss, self).__init__()
      self.weight = weight
      self.size_average = size_average
      self.ignore_index = ignore_index
      self.sequence_normalize = sequence_normalize
      self.sample_normalize = sample_normalize
      self.loss_sem = CosineEmbeddingLoss()
      self.is_cosin_loss = True
      self.loss_func_rec = nn.CrossEntropyLoss(
          weight=None, reduction="none"
      )
  
file_path: PaddleOCR/ppocr/losses/rec_aster_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 AsterLoss object from inherited base classes: nn with example: obj = AsterLoss(weight, size_average, ignore_index, sequence_normalize, sample_normalize)