class_docstr: attention-based label smoothing loss for S2ST.
code: def __init__(
      self,
      vocab_size: int,
      padding_idx: int = -1,
      weight: float = 1.0,
      smoothing: float = 0.0,
      normalize_length: str2bool = False,
      criterion: torch.nn.Module = torch.nn.KLDivLoss(reduction="none"),
  ):
      super().__init__()
      assert check_argument_types()
      self.weight = weight
      self.loss = LabelSmoothingLoss(
          size=vocab_size,
          padding_idx=padding_idx,
          smoothing=smoothing,
          normalize_length=normalize_length,
          criterion=criterion,
      )
  
file_path: espnet/espnet2/s2st/losses/attention_loss.py
imports: import torch
  import torch.nn.functional
  from typeguard import check_argument_types
  from espnet2.s2st.losses.abs_loss import AbsS2STLoss
  from espnet2.utils.types import str2bool
  from espnet.nets.pytorch_backend.transformer.label_smoothing_loss import LabelSmoothingLoss
label_desc: Use image node_id 1 to create a new S2STAttentionLoss object from inherited base classes: AbsS2STLoss with example: obj = S2STAttentionLoss(vocab_size, padding_idx, weight, smoothing, normalize_length, criterion)