class_docstr: ESPnet2ASRTransducerModel module definition.
  
  Args:
      vocab_size: Size of complete vocabulary (w/ SOS/EOS and blank included).
      token_list: List of tokens in vocabulary (minus reserved tokens).
      frontend: Frontend module.
      specaug: SpecAugment module.
      normalize: Normalization module.
      encoder: Encoder module.
      decoder: Decoder module.
      joint_network: Joint Network module.
      transducer_weight: Weight of the Transducer loss.
      use_k2_pruned_loss: Whether to use k2 pruned Transducer loss.
      k2_pruned_loss_args: Arguments of the k2 loss pruned Transducer loss.
      warmup_steps: Number of steps in warmup, used for pruned loss scaling.
      validation_nstep: Maximum number of symbol expansions at each time step
                        when reporting CER or/and WER using mAES.
      fastemit_lambda: FastEmit lambda value.
      auxiliary_ctc_weight: Weight of auxiliary CTC loss.
      auxiliary_ctc_dropout_rate: Dropout rate for auxiliary CTC loss inputs.
      auxiliary_lm_loss_weight: Weight of auxiliary LM loss.
      auxiliary_lm_loss_smoothing: Smoothing rate for LM loss' label smoothing.
      ignore_id: Initial padding ID.
      sym_space: Space symbol.
      sym_blank: Blank Symbol.
      report_cer: Whether to report Character Error Rate during validation.
      report_wer: Whether to report Word Error Rate during validation.
      extract_feats_in_collect_stats: Whether to use extract_feats stats collection.
class_docstr_tok: ["ESPnet2ASRTransducerModel","module","definition",".","Args",":","vocab_size",":","Size","of","complete","vocabulary","(","w\/","SOS\/EOS","and","blank","included",")",".","token_list",":","List","of","tokens","in","vocabulary","(","minus","reserved","tokens",")",".","frontend",":","Frontend","module",".","specaug",":","SpecAugment","module",".","normalize",":","Normalization","module",".","encoder",":","Encoder","module",".","decoder",":","Decoder","module",".","joint_network",":","Joint","Network","module",".","transducer_weight",":","Weight","of","the","Transducer","loss",".","use_k2_pruned_loss",":","Whether","to","use","k2","pruned","Transducer","loss",".","k2_pruned_loss_args",":","Arguments","of","the","k2","loss","pruned","Transducer","loss",".","warmup_steps",":","Number","of","steps","in","warmup",",","used","for","pruned","loss","scaling",".","validation_nstep",":","Maximum","number","of","symbol","expansions","at","each","time","step","when","reporting","CER","or\/and","WER","using","mAES",".","fastemit_lambda",":","FastEmit","lambda","value",".","auxiliary_ctc_weight",":","Weight","of","auxiliary","CTC","loss",".","auxiliary_ctc_dropout_rate",":","Dropout","rate","for","auxiliary","CTC","loss","inputs",".","auxiliary_lm_loss_weight",":","Weight","of","auxiliary","LM","loss",".","auxiliary_lm_loss_smoothing",":","Smoothing","rate","for","LM","loss","'","label","smoothing",".","ignore_id",":","Initial","padding","ID",".","sym_space",":","Space","symbol",".","sym_blank",":","Blank","Symbol",".","report_cer",":","Whether","to","report","Character","Error","Rate","during","validation",".","report_wer",":","Whether","to","report","Word","Error","Rate","during","validation",".","extract_feats_in_collect_stats",":","Whether","to","use","extract_feats","stats","collection","."]
docstr: Compute Transducer loss.
  
  Args:
      encoder_out: Encoder output sequences. (B, T, D_enc)
      joint_out: Joint Network output sequences (B, T, U, D_joint)
      target: Target label ID sequences. (B, L)
      t_len: Encoder output sequences lengths. (B,)
      u_len: Target label ID sequences lengths. (B,)
  
  Return:
      loss_transducer: Transducer loss value.
docstr_tok: ["Compute","Transducer","loss",".","Args",":","encoder_out",":","Encoder","output","sequences",".","(","B",",","T",",","D_enc",")","joint_out",":","Joint","Network","output","sequences","(","B",",","T",",","U",",","D_joint",")","target",":","Target","label","ID","sequences",".","(","B",",","L",")","t_len",":","Encoder","output","sequences","lengths",".","(","B",",",")","u_len",":","Target","label","ID","sequences","lengths",".","(","B",",",")","Return",":","loss_transducer",":","Transducer","loss","value","."]
code: def _calc_transducer_loss(
      self,
      encoder_out: torch.Tensor,
      joint_out: torch.Tensor,
      target: torch.Tensor,
      t_len: torch.Tensor,
      u_len: torch.Tensor,
  ) -> torch.Tensor:
      """Compute Transducer loss.
  
      Args:
          encoder_out: Encoder output sequences. (B, T, D_enc)
          joint_out: Joint Network output sequences (B, T, U, D_joint)
          target: Target label ID sequences. (B, L)
          t_len: Encoder output sequences lengths. (B,)
          u_len: Target label ID sequences lengths. (B,)
  
      Return:
          loss_transducer: Transducer loss value.
  
      """
      if self.criterion_transducer is None:
          try:
              from warprnnt_pytorch import RNNTLoss
  
              self.criterion_transducer = RNNTLoss(
                  reduction="mean",
                  fastemit_lambda=self.fastemit_lambda,
              )
          except ImportError:
              logging.error(
                  "warp-transducer was not installed. "
                  "Please consult the installation documentation."
              )
              exit(1)
  
      with autocast(False):
          loss_transducer = self.criterion_transducer(
              joint_out.float(),
              target,
              t_len,
              u_len,
          )
  
      return loss_transducer
  
imports: import logging
  from contextlib import contextmanager
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  from packaging.version import parse
  from typeguard import check_argument_types
  from espnet2.asr.frontend.abs_frontend import AbsFrontend
  from espnet2.asr.specaug.abs_specaug import AbsSpecAug
  from espnet2.asr_transducer.decoder.abs_decoder import AbsDecoder
  from espnet2.asr_transducer.encoder.encoder import Encoder
  from espnet2.asr_transducer.joint_network import JointNetwork
  from espnet2.asr_transducer.utils import get_transducer_task_io
  from espnet2.layers.abs_normalize import AbsNormalize
  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 ESPnetASRTransducerModel obj's underlying member method code with example usage: obj._calc_transducer_loss(encoder_out, joint_out, target, t_len, u_len) and returns: loss_transducer