class_docstr: Custom decoder module for Transducer model.
  
  Args:
      odim: Output dimension.
      dec_arch: Decoder block architecture (type and parameters).
      input_layer: Input layer type.
      repeat_block: Number of times dec_arch is repeated.
      joint_activation_type: Type of activation for joint network.
      positional_encoding_type: Positional encoding type.
      positionwise_layer_type: Positionwise layer type.
      positionwise_activation_type: Positionwise activation type.
      input_layer_dropout_rate: Dropout rate for input layer.
      blank_id: Blank symbol ID.
class_docstr_tok: ["Custom","decoder","module","for","Transducer","model",".","Args",":","odim",":","Output","dimension",".","dec_arch",":","Decoder","block","architecture","(","type","and","parameters",")",".","input_layer",":","Input","layer","type",".","repeat_block",":","Number","of","times","dec_arch","is","repeated",".","joint_activation_type",":","Type","of","activation","for","joint","network",".","positional_encoding_type",":","Positional","encoding","type",".","positionwise_layer_type",":","Positionwise","layer","type",".","positionwise_activation_type",":","Positionwise","activation","type",".","input_layer_dropout_rate",":","Dropout","rate","for","input","layer",".","blank_id",":","Blank","symbol","ID","."]
docstr: Construct a CustomDecoder object.
docstr_tok: ["Construct","a","CustomDecoder","object","."]
code: def __init__(
      self,
      odim: int,
      dec_arch: List,
      input_layer: str = "embed",
      repeat_block: int = 0,
      joint_activation_type: str = "tanh",
      positional_encoding_type: str = "abs_pos",
      positionwise_layer_type: str = "linear",
      positionwise_activation_type: str = "relu",
      input_layer_dropout_rate: float = 0.0,
      blank_id: int = 0,
  ):
      """Construct a CustomDecoder object."""
      torch.nn.Module.__init__(self)
  
      self.embed, self.decoders, ddim, _ = build_blocks(
          "decoder",
          odim,
          input_layer,
          dec_arch,
          repeat_block=repeat_block,
          positional_encoding_type=positional_encoding_type,
          positionwise_layer_type=positionwise_layer_type,
          positionwise_activation_type=positionwise_activation_type,
          input_layer_dropout_rate=input_layer_dropout_rate,
          padding_idx=blank_id,
      )
  
      self.after_norm = LayerNorm(ddim)
  
      self.dlayers = len(self.decoders)
      self.dunits = ddim
      self.odim = odim
  
      self.blank_id = blank_id
  
file_path: espnet/espnet/nets/pytorch_backend/transducer/custom_decoder.py
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from espnet.nets.pytorch_backend.transducer.blocks import build_blocks
  from espnet.nets.pytorch_backend.transducer.utils import check_batch_states, check_state, pad_sequence
  from espnet.nets.pytorch_backend.transformer.layer_norm import LayerNorm
  from espnet.nets.pytorch_backend.transformer.mask import subsequent_mask
  from espnet.nets.transducer_decoder_interface import ExtendedHypothesis, Hypothesis, TransducerDecoderInterface
label_desc: Use image node_id 1 to create a new CustomDecoder object from inherited base classes: TransducerDecoderInterface, torch.nn with example: obj = CustomDecoder(odim, dec_arch, input_layer, repeat_block, joint_activation_type, positional_encoding_type, positionwise_layer_type, positionwise_activation_type, input_layer_dropout_rate, blank_id)