code: def __init__(self, smoothing=True, ignore_index=0, **kwargs):
      super(NRTRLoss, self).__init__()
      if ignore_index >= 0 and not smoothing:
          self.loss_func = nn.CrossEntropyLoss(
              reduction="mean", ignore_index=ignore_index
          )
      self.smoothing = smoothing
  
imports: import paddle
  from paddle import nn
  import paddle.nn.functional
label_desc: Use image node_id 1 to create a new NRTRLoss object from inherited base classes: nn with example: obj = NRTRLoss(smoothing, ignore_index)