class_docstr: Adapted from Classy Vision: ./classy_vision/losses/soft_target_cross_entropy_loss.py.
  This allows the targets for the cross entropy loss to be multi-label.
docstr: Args:
      ignore_index (int): sample should be ignored for loss if the class is this value.
      reduction (str): specifies reduction to apply to the output.
      normalize_targets (bool): whether the targets should be normalized to a sum of 1
          based on the total count of positive targets for a given sample.
docstr_tok: ["Args",":","ignore_index","(","int",")",":","sample","should","be","ignored","for","loss","if","the","class","is","this","value",".","reduction","(","str",")",":","specifies","reduction","to","apply","to","the","output",".","normalize_targets","(","bool",")",":","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: int = -100,
      reduction: str = "mean",
      normalize_targets: bool = True,
  ) -> None:
      """
      Args:
          ignore_index (int): sample should be ignored for loss if the class is this value.
          reduction (str): specifies reduction to apply to the output.
          normalize_targets (bool): whether the targets should be normalized to a sum of 1
              based on the total count of positive targets for a given sample.
      """
      super().__init__()
      set_attributes(self, locals())
      assert isinstance(self.normalize_targets, bool)
      if self.reduction not in ["mean", "none"]:
          raise NotImplementedError(
              'reduction type "{}" not implemented'.format(
                  self.reduction
              )
          )
      self.eps = torch.finfo(torch.float32).eps
  
file_path: pytorchvideo/pytorchvideo/losses/soft_target_cross_entropy.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from pytorchvideo.layers.utils import set_attributes
  from pytorchvideo.transforms.functional import convert_to_one_hot
label_desc: Use image node_id 1 to create a new SoftTargetCrossEntropyLoss object from inherited base classes: nn with example: obj = SoftTargetCrossEntropyLoss(ignore_index, reduction, normalize_targets)