class_docstr: Custom encoder module for transducer models.
  
  Args:
      idim: Input dimension.
      enc_arch: Encoder block architecture (type and parameters).
      input_layer: Input layer type.
      repeat_block: Number of times blocks_arch is repeated.
      self_attn_type: Self-attention type.
      positional_encoding_type: Positional encoding type.
      positionwise_layer_type: Positionwise layer type.
      positionwise_activation_type: Positionwise activation type.
      conv_mod_activation_type: Convolutional module activation type.
      aux_enc_output_layers: Layer IDs for auxiliary encoder output sequences.
      input_layer_dropout_rate: Dropout rate for input layer.
      input_layer_pos_enc_dropout_rate: Dropout rate for input layer pos. enc.
      padding_idx: Padding symbol ID for embedding layer.
docstr: Construct an CustomEncoder object.
docstr_tok: ["Construct","an","CustomEncoder","object","."]
code: def __init__(
      self,
      idim: int,
      enc_arch: List,
      input_layer: str = "linear",
      repeat_block: int = 1,
      self_attn_type: str = "selfattn",
      positional_encoding_type: str = "abs_pos",
      positionwise_layer_type: str = "linear",
      positionwise_activation_type: str = "relu",
      conv_mod_activation_type: str = "relu",
      aux_enc_output_layers: List = [],
      input_layer_dropout_rate: float = 0.0,
      input_layer_pos_enc_dropout_rate: float = 0.0,
      padding_idx: int = -1,
  ):
      """Construct an CustomEncoder object."""
      super().__init__()
  
      (
          self.embed,
          self.encoders,
          self.enc_out,
          self.conv_subsampling_factor,
      ) = build_blocks(
          "encoder",
          idim,
          input_layer,
          enc_arch,
          repeat_block=repeat_block,
          self_attn_type=self_attn_type,
          positional_encoding_type=positional_encoding_type,
          positionwise_layer_type=positionwise_layer_type,
          positionwise_activation_type=positionwise_activation_type,
          conv_mod_activation_type=conv_mod_activation_type,
          input_layer_dropout_rate=input_layer_dropout_rate,
          input_layer_pos_enc_dropout_rate=input_layer_pos_enc_dropout_rate,
          padding_idx=padding_idx,
      )
  
      self.after_norm = LayerNorm(self.enc_out)
  
      self.n_blocks = len(enc_arch) * repeat_block
  
      self.aux_enc_output_layers = aux_enc_output_layers
  
file_path: espnet/espnet/nets/pytorch_backend/transducer/custom_encoder.py
imports: from typing import List, Tuple, Union
  import torch
  from espnet.nets.pytorch_backend.transducer.blocks import build_blocks
  from espnet.nets.pytorch_backend.transducer.vgg2l import VGG2L
  from espnet.nets.pytorch_backend.transformer.layer_norm import LayerNorm
  from espnet.nets.pytorch_backend.transformer.subsampling import Conv2dSubsampling
label_desc: Use image node_id 1 to create a new CustomEncoder object from inherited base classes: torch.nn with example: obj = CustomEncoder(idim, enc_arch, input_layer, repeat_block, _attn_type, positional_encoding_type, positionwise_layer_type, positionwise_activation_type, conv_mod_activation_type, aux_enc_output_layers, input_layer_dropout_rate, input_layer_pos_enc_dropout_rate, padding_idx)