docstr: Intializer for the label smoothed cross entropy loss.
  This decreases gap between output scores and encourages generalization.
  Targets provided to forward can be one-hot vectors (NxC) or class indices (Nx1).
  
  This normalizes the targets to a sum of 1 based on the total count of positive
  targets for a given sample before applying label smoothing.
  
  Args:
      ignore_index: sample should be ignored for loss if the class is this value
      reduction: specifies reduction to apply to the output
      smoothing_param: value to be added to each target entry
code: def __init__(
      self, ignore_index=-100, reduction="mean", smoothing_param=None
  ):
      """Intializer for the label smoothed cross entropy loss.
      This decreases gap between output scores and encourages generalization.
      Targets provided to forward can be one-hot vectors (NxC) or class indices (Nx1).
  
      This normalizes the targets to a sum of 1 based on the total count of positive
      targets for a given sample before applying label smoothing.
  
      Args:
          ignore_index: sample should be ignored for loss if the class is this value
          reduction: specifies reduction to apply to the output
          smoothing_param: value to be added to each target entry
      """
      super().__init__()
      self._ignore_index = ignore_index
      self._reduction = reduction
      self._smoothing_param = smoothing_param
      self.loss_function = SoftTargetCrossEntropyLoss(
          self._ignore_index, self._reduction, normalize_targets=False
      )
      self._eps = np.finfo(np.float32).eps
  
file_path: ClassyVision/classy_vision/losses/label_smoothing_loss.py
imports: from typing import Any, Dict
  import numpy
  from classy_vision.generic.util import convert_to_one_hot
  from classy_vision.losses import ClassyLoss, register_loss
  from classy_vision.losses.soft_target_cross_entropy_loss import SoftTargetCrossEntropyLoss
label_desc: Use image node_id 1 to create a new LabelSmoothingCrossEntropyLoss object from inherited base classes: ClassyLoss with example: obj = LabelSmoothingCrossEntropyLoss(ignore_index, reduction, smoothing_param)