docstr: Intializer for the soft target cross-entropy loss loss.
  This allows the targets for the cross entropy loss to be multilabel
  
  Args:
      ignore_index: sample should be ignored for loss if the class is this value
      reduction: specifies reduction to apply to the output
      normalize_targets: whether the targets should be normalized to a sum of 1
          based on the total count of positive targets for a given sample
code: def __init__(
      self, ignore_index=-100, reduction="mean", normalize_targets=True
  ):
      """Intializer for the soft target cross-entropy loss loss.
      This allows the targets for the cross entropy loss to be multilabel
  
      Args:
          ignore_index: sample should be ignored for loss if the class is this value
          reduction: specifies reduction to apply to the output
          normalize_targets: whether the targets should be normalized to a sum of 1
              based on the total count of positive targets for a given sample
      """
      super(SoftTargetCrossEntropyLoss, self).__init__()
      self._ignore_index = ignore_index
      self._reduction = reduction
      assert isinstance(normalize_targets, bool)
      self._normalize_targets = normalize_targets
      if self._reduction not in ["none", "mean"]:
          raise NotImplementedError(
              'reduction type "{}" not implemented'.format(
                  self._reduction
              )
          )
      self._eps = torch.finfo(torch.float32).eps
  
file_path: ClassyVision/classy_vision/losses/soft_target_cross_entropy_loss.py
imports: from typing import Any, Dict
  import torch
  import torch.nn.functional
  from classy_vision.generic.util import convert_to_one_hot
  from classy_vision.losses import ClassyLoss, register_loss
label_desc: Use image node_id 1 to create a new SoftTargetCrossEntropyLoss object from inherited base classes: ClassyLoss with example: obj = SoftTargetCrossEntropyLoss(ignore_index, reduction, normalize_targets)