class_docstr: Calculate negative log likelihodd for sequence input, also applies label smoothing (if set).
class_docstr_tok: ["Calculate","negative","log","likelihodd","for","sequence","input",",","also","applies","label","smoothing","(","if","set",")","."]
code: def __init__(
      self, reduction="mean", label_smoothing=0.0, eps=1e-8, **kwargs
  ):
      super().__init__()
      self.reduction = reduction
      self.label_smoothing = label_smoothing
      self.nll_loss = torch.nn.NLLLoss(reduction="none", **kwargs)
      self.eps = eps
  
file_path: NeMo/nemo/collections/common/losses/smoothed_cross_entropy.py
imports: from typing import Optional
  import torch
  from nemo.core.classes import Exportable, Loss, NeuralModule, typecheck
  from nemo.core.neural_types import LabelsType, LogprobsType, LossType, MaskType, NeuralType
label_desc: Use image node_id 3 to create a new SmoothedNLLLoss object from inherited base classes: NeuralModule, Exportable with example: obj = SmoothedNLLLoss(reduction, label_smoothing, eps)