class_docstr: Label Smoothing Loss.
  
  Args:
      smoothing (float): smoothing rate (0.0 means the conventional CE).
      n_target_vocab (int): number of classes.
      normalize_length (bool): normalize loss by sequence length if True.
docstr: Initialize Loss.
docstr_tok: ["Initialize","Loss","."]
code: def __init__(
      self,
      smoothing,
      n_target_vocab,
      normalize_length=False,
      ignore_id=-1,
  ):
      """Initialize Loss."""
      super(LabelSmoothingLoss, self).__init__()
      self.use_label_smoothing = False
      if smoothing > 0.0:
          logging.info("Use label smoothing")
          self.smoothing = smoothing
          self.confidence = 1.0 - smoothing
          self.use_label_smoothing = True
          self.n_target_vocab = n_target_vocab
      self.normalize_length = normalize_length
      self.ignore_id = ignore_id
      self.acc = None
  
imports: import logging
  import chainer
  import chainer.functions
label_desc: Use image node_id 1 to create a new LabelSmoothingLoss object from inherited base classes: chainer with example: obj = LabelSmoothingLoss(smoothing, n_target_vocab, normalize_length, ignore_id)