docstr: Instantiates a LabelSmoothingCrossEntropyLoss from a configuration.
  
  Args:
      config: A configuration for a LabelSmoothingCrossEntropyLoss.
          See :func:`__init__` for parameters expected in the config.
  
  Returns:
      A LabelSmoothingCrossEntropyLoss instance.
code: def from_config(
      cls, config: Dict[str, Any]
  ) -> "LabelSmoothingCrossEntropyLoss":
      """Instantiates a LabelSmoothingCrossEntropyLoss from a configuration.
  
      Args:
          config: A configuration for a LabelSmoothingCrossEntropyLoss.
              See :func:`__init__` for parameters expected in the config.
  
      Returns:
          A LabelSmoothingCrossEntropyLoss instance.
      """
  
      assert (
          "smoothing_param" in config
      ), "Label Smoothing needs a smoothing parameter"
      return cls(
          ignore_index=config.get("ignore_index", -100),
          reduction=config.get("reduction", "mean"),
          smoothing_param=config.get("smoothing_param"),
      )
  
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 2 for calling the LabelSmoothingCrossEntropyLoss obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls