class_docstr: E2E module for Transducer models.
  
  Args:
      idim: Dimension of inputs.
      odim: Dimension of outputs.
      args: Namespace containing model options.
      ignore_id: Padding symbol ID.
      blank_id: Blank symbol ID.
      training: Whether the model is initialized in training or inference mode.
class_docstr_tok: ["E2E","module","for","Transducer","models",".","Args",":","idim",":","Dimension","of","inputs",".","odim",":","Dimension","of","outputs",".","args",":","Namespace","containing","model","options",".","ignore_id",":","Padding","symbol","ID",".","blank_id",":","Blank","symbol","ID",".","training",":","Whether","the","model","is","initialized","in","training","or","inference","mode","."]
docstr: E2E forward.
  
  Args:
      feats: Feature sequences. (B, F, D_feats)
      feats_len: Feature sequences lengths. (B,)
      labels: Label ID sequences. (B, L)
  
  Returns:
      loss: Transducer loss value
docstr_tok: ["E2E","forward",".","Args",":","feats",":","Feature","sequences",".","(","B",",","F",",","D_feats",")","feats_len",":","Feature","sequences","lengths",".","(","B",",",")","labels",":","Label","ID","sequences",".","(","B",",","L",")","Returns",":","loss",":","Transducer","loss","value"]
code: def forward(
      self,
      feats: torch.Tensor,
      feats_len: torch.Tensor,
      labels: torch.Tensor,
  ) -> torch.Tensor:
      """E2E forward.
  
      Args:
          feats: Feature sequences. (B, F, D_feats)
          feats_len: Feature sequences lengths. (B,)
          labels: Label ID sequences. (B, L)
  
      Returns:
          loss: Transducer loss value
  
      """
      # 1. encoder
      feats = feats[:, : max(feats_len)]
  
      if self.etype == "custom":
          feats_mask = (
              make_non_pad_mask(feats_len.tolist())
              .to(feats.device)
              .unsqueeze(-2)
          )
  
          _enc_out, _enc_out_len = self.encoder(feats, feats_mask)
      else:
          _enc_out, _enc_out_len, _ = self.enc(feats, feats_len)
  
      if self.use_auxiliary_enc_outputs:
          enc_out, aux_enc_out = _enc_out[0], _enc_out[1]
          enc_out_len, aux_enc_out_len = (
              _enc_out_len[0],
              _enc_out_len[1],
          )
      else:
          enc_out, aux_enc_out = _enc_out, None
          enc_out_len, aux_enc_out_len = _enc_out_len, None
  
      # 2. decoder
      dec_in = get_decoder_input(labels, self.blank_id, self.ignore_id)
  
      if self.dtype == "custom":
          self.decoder.set_device(enc_out.device)
  
          dec_in_mask = target_mask(dec_in, self.blank_id)
          dec_out, _ = self.decoder(dec_in, dec_in_mask)
      else:
          self.dec.set_device(enc_out.device)
  
          dec_out = self.dec(dec_in)
  
      # 3. Transducer task and auxiliary tasks computation
      losses = self.transducer_tasks(
          enc_out,
          aux_enc_out,
          dec_out,
          labels,
          enc_out_len,
          aux_enc_out_len,
      )
  
      if self.training or self.error_calculator is None:
          cer, wer = None, None
      else:
          cer, wer = self.error_calculator(
              enc_out, self.transducer_tasks.get_target()
          )
  
      self.loss = sum(losses)
      loss_data = float(self.loss)
  
      if not math.isnan(loss_data):
          self.reporter.report(
              loss_data,
              *[float(loss) for loss in losses],
              cer,
              wer,
          )
      else:
          logging.warning("loss (=%f) is not correct", loss_data)
  
      return self.loss
  
imports: import logging
  import math
  from argparse import ArgumentParser, Namespace
  from dataclasses import asdict
  from typing import List
  import chainer
  import numpy
  import torch
  from espnet.nets.asr_interface import ASRInterface
  from espnet.nets.beam_search_transducer import BeamSearchTransducer
  from espnet.nets.pytorch_backend.nets_utils import get_subsample, make_non_pad_mask
  from espnet.nets.pytorch_backend.transducer.arguments import add_auxiliary_task_arguments, add_custom_decoder_arguments, add_custom_encoder_arguments, add_custom_training_arguments, add_decoder_general_arguments, add_encoder_general_arguments, add_rnn_decoder_arguments, add_rnn_encoder_arguments, add_transducer_arguments
  from espnet.nets.pytorch_backend.transducer.custom_decoder import CustomDecoder
  from espnet.nets.pytorch_backend.transducer.custom_encoder import CustomEncoder
  from espnet.nets.pytorch_backend.transducer.error_calculator import ErrorCalculator
  from espnet.nets.pytorch_backend.transducer.initializer import initializer
  from espnet.nets.pytorch_backend.transducer.rnn_decoder import RNNDecoder
  from espnet.nets.pytorch_backend.transducer.rnn_encoder import encoder_for
  from espnet.nets.pytorch_backend.transducer.transducer_tasks import TransducerTasks
  from espnet.nets.pytorch_backend.transducer.utils import get_decoder_input, valid_aux_encoder_output_layers
  from espnet.nets.pytorch_backend.transformer.attention import MultiHeadedAttention, RelPositionMultiHeadedAttention
  from espnet.nets.pytorch_backend.transformer.mask import target_mask
  from espnet.nets.pytorch_backend.transformer.plot import PlotAttentionReport
  from espnet.utils.fill_missing_args import fill_missing_args
label_desc: Use image node_id 15 for calling the E2E obj's underlying member method code with example usage: obj.forward(feats, feats_len, labels) and returns: self