class_docstr: E2E module.
  
  :param int idim: dimension of inputs
  :param int odim: dimension of outputs
  :param Namespace args: argument Namespace containing options
class_docstr_tok: ["E2E","module",".",":","param","int","idim",":","dimension","of","inputs",":","param","int","odim",":","dimension","of","outputs",":","param","Namespace","args",":","argument","Namespace","containing","options"]
docstr: Construct an E2E object.
  
  :param int idim: dimension of inputs
  :param int odim: dimension of outputs
  :param Namespace args: argument Namespace containing options
docstr_tok: ["Construct","an","E2E","object",".",":","param","int","idim",":","dimension","of","inputs",":","param","int","odim",":","dimension","of","outputs",":","param","Namespace","args",":","argument","Namespace","containing","options"]
code: def __init__(self, idim, odim, args, ignore_id=-1):
      """Construct an E2E object.
  
      :param int idim: dimension of inputs
      :param int odim: dimension of outputs
      :param Namespace args: argument Namespace containing options
      """
      super(E2E, self).__init__(idim, odim, args, ignore_id=-1)
      if args.transformer_attn_dropout_rate is None:
          args.transformer_attn_dropout_rate = args.dropout_rate
      self.encoder = EncoderMix(
          idim=idim,
          attention_dim=args.adim,
          attention_heads=args.aheads,
          linear_units=args.eunits,
          num_blocks_sd=args.elayers_sd,
          num_blocks_rec=args.elayers,
          input_layer=args.transformer_input_layer,
          dropout_rate=args.dropout_rate,
          positional_dropout_rate=args.dropout_rate,
          attention_dropout_rate=args.transformer_attn_dropout_rate,
          num_spkrs=args.num_spkrs,
      )
  
      if args.mtlalpha > 0.0:
          self.ctc = CTC(
              odim,
              args.adim,
              args.dropout_rate,
              ctc_type=args.ctc_type,
              reduce=False,
          )
      else:
          self.ctc = None
  
      self.num_spkrs = args.num_spkrs
      self.pit = PIT(self.num_spkrs)
  
imports: import logging
  import math
  from argparse import Namespace
  import numpy
  import torch
  from espnet.nets.asr_interface import ASRInterface
  from espnet.nets.ctc_prefix_score import CTCPrefixScore
  from espnet.nets.e2e_asr_common import end_detect
  from espnet.nets.pytorch_backend.ctc import CTC
  from espnet.nets.pytorch_backend.e2e_asr import CTC_LOSS_THRESHOLD
  from espnet.nets.pytorch_backend.e2e_asr_mix import E2E
  from espnet.nets.pytorch_backend.e2e_asr_mix import PIT
  from espnet.nets.pytorch_backend.e2e_asr_transformer import E2E
  from espnet.nets.pytorch_backend.nets_utils import make_non_pad_mask, th_accuracy
  from espnet.nets.pytorch_backend.rnn.decoders import CTC_SCORING_RATIO
  from espnet.nets.pytorch_backend.transformer.add_sos_eos import add_sos_eos
  from espnet.nets.pytorch_backend.transformer.encoder_mix import EncoderMix
  from espnet.nets.pytorch_backend.transformer.mask import subsequent_mask, target_mask
label_desc: Use image node_id 2 to create a new E2E object from inherited base classes: E2EASR, ASRInterface, torch.nn with example: obj = E2E(idim, odim, args, ignore_id)