class_docstr: Joint model Enhancement and Speech to Text.
class_docstr_tok: ["Joint","model","Enhancement","and","Speech","to","Text","."]
docstr: Compute negative log likelihood(nll) from transformer-decoder
  
  Normally, this function is called in batchify_nll.
  
  Args:
      encoder_out: (Batch, Length, Dim)
      encoder_out_lens: (Batch,)
      ys_pad: (Batch, Length)
      ys_pad_lens: (Batch,)
docstr_tok: ["Compute","negative","log","likelihood","(","nll",")","from","transformer-decoder","Normally",",","this","function","is","called","in","batchify_nll",".","Args",":","encoder_out",":","(","Batch",",","Length",",","Dim",")","encoder_out_lens",":","(","Batch",",",")","ys_pad",":","(","Batch",",","Length",")","ys_pad_lens",":","(","Batch",",",")"]
code: def nll(
      self,
      encoder_out: torch.Tensor,
      encoder_out_lens: torch.Tensor,
      ys_pad: torch.Tensor,
      ys_pad_lens: torch.Tensor,
  ) -> torch.Tensor:
      """Compute negative log likelihood(nll) from transformer-decoder
  
      Normally, this function is called in batchify_nll.
  
      Args:
          encoder_out: (Batch, Length, Dim)
          encoder_out_lens: (Batch,)
          ys_pad: (Batch, Length)
          ys_pad_lens: (Batch,)
      """
      return self.s2t_model.nll(
          encoder_out,
          encoder_out_lens,
          ys_pad,
          ys_pad_lens,
      )
  
imports: import logging
  import random
  from contextlib import contextmanager
  from typing import Dict, List, Tuple, Union
  import numpy
  import torch
  import torch.nn.functional
  from packaging.version import parse
  from scipy.optimize import linear_sum_assignment
  from typeguard import check_argument_types
  from espnet2.asr.espnet_model import ESPnetASRModel
  from espnet2.diar.espnet_model import ESPnetDiarizationModel
  from espnet2.enh.espnet_model import ESPnetEnhancementModel
  from espnet2.st.espnet_model import ESPnetSTModel
  from espnet2.torch_utils.device_funcs import force_gatherable
  from espnet2.train.abs_espnet_model import AbsESPnetModel
label_desc: Use image node_id 6 for calling the ESPnetEnhS2TModel obj's underlying member method code with example usage: obj.nll(encoder_out, encoder_out_lens, ys_pad, ys_pad_lens) and returns: self