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
      """
      odim += 1  # for the mask token
  
      super().__init__(idim, odim, args, ignore_id)
      assert 0.0 <= self.mtlalpha < 1.0, "mtlalpha should be [0.0, 1.0)"
  
      self.mask_token = odim - 1
      self.sos = odim - 2
      self.eos = odim - 2
      self.odim = odim
  
      self.intermediate_ctc_weight = args.intermediate_ctc_weight
      self.intermediate_ctc_layers = None
      if args.intermediate_ctc_layer != "":
          self.intermediate_ctc_layers = [
              int(i) for i in args.intermediate_ctc_layer.split(",")
          ]
  
      if args.maskctc_use_conformer_encoder:
          if args.transformer_attn_dropout_rate is None:
              args.transformer_attn_dropout_rate = (
                  args.conformer_dropout_rate
              )
          self.encoder = Encoder(
              idim=idim,
              attention_dim=args.adim,
              attention_heads=args.aheads,
              linear_units=args.eunits,
              num_blocks=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,
              pos_enc_layer_type=args.transformer_encoder_pos_enc_layer_type,
              selfattention_layer_type=args.transformer_encoder_selfattn_layer_type,
              activation_type=args.transformer_encoder_activation_type,
              macaron_style=args.macaron_style,
              use_cnn_module=args.use_cnn_module,
              cnn_module_kernel=args.cnn_module_kernel,
              stochastic_depth_rate=args.stochastic_depth_rate,
              intermediate_layers=self.intermediate_ctc_layers,
          )
      self.reset_parameters(args)
  
file_path: espnet/espnet/nets/pytorch_backend/e2e_asr_maskctc.py
imports: import logging
  import math
  from distutils.util import strtobool
  from itertools import groupby
  import numpy
  import torch
  from espnet.nets.pytorch_backend.conformer.argument import add_arguments_conformer_common
  from espnet.nets.pytorch_backend.conformer.encoder import Encoder
  from espnet.nets.pytorch_backend.e2e_asr import CTC_LOSS_THRESHOLD
  from espnet.nets.pytorch_backend.e2e_asr_transformer import E2E
  from espnet.nets.pytorch_backend.maskctc.add_mask_token import mask_uniform
  from espnet.nets.pytorch_backend.maskctc.mask import square_mask
  from espnet.nets.pytorch_backend.nets_utils import make_non_pad_mask, th_accuracy
label_desc: Use image node_id 3 to create a new E2E object from inherited base classes: E2ETransformer with example: obj = E2E(idim, odim, args, ignore_id)