code: def __init__(
      self,
      vocab_size: int,
      encoder_output_size: int,
      attention_heads: int = 4,
      linear_units: int = 2048,
      num_blocks: int = 6,
      dropout_rate: float = 0.1,
      positional_dropout_rate: float = 0.1,
      self_attention_dropout_rate: float = 0.0,
      src_attention_dropout_rate: float = 0.0,
      input_layer: str = "embed",
      use_output_layer: bool = True,
      pos_enc_class=PositionalEncoding,
      normalize_before: bool = True,
      concat_after: bool = False,
  ):
      assert check_argument_types()
      super().__init__()
      attention_dim = encoder_output_size
      vocab_size += 1  # for mask token
  
      if input_layer == "embed":
          self.embed = torch.nn.Sequential(
              torch.nn.Embedding(vocab_size, attention_dim),
              pos_enc_class(attention_dim, positional_dropout_rate),
          )
      elif input_layer == "linear":
          self.embed = torch.nn.Sequential(
              torch.nn.Linear(vocab_size, attention_dim),
              torch.nn.LayerNorm(attention_dim),
              torch.nn.Dropout(dropout_rate),
              torch.nn.ReLU(),
              pos_enc_class(attention_dim, positional_dropout_rate),
          )
      else:
          raise ValueError(
              f"only 'embed' or 'linear' is supported: {input_layer}"
          )
  
      self.normalize_before = normalize_before
      if self.normalize_before:
          self.after_norm = LayerNorm(attention_dim)
      if use_output_layer:
          self.output_layer = torch.nn.Linear(attention_dim, vocab_size)
      else:
          self.output_layer = None
  
      self.decoders = repeat(
          num_blocks,
          lambda lnum: DecoderLayer(
              attention_dim,
              MultiHeadedAttention(
                  attention_heads,
                  attention_dim,
                  self_attention_dropout_rate,
              ),
              MultiHeadedAttention(
                  attention_heads,
                  attention_dim,
                  src_attention_dropout_rate,
              ),
              PositionwiseFeedForward(
                  attention_dim, linear_units, dropout_rate
              ),
              dropout_rate,
              normalize_before,
              concat_after,
          ),
      )
  
file_path: espnet/espnet2/asr/decoder/mlm_decoder.py
imports: from typing import Tuple
  import torch
  from typeguard import check_argument_types
  from espnet2.asr.decoder.abs_decoder import AbsDecoder
  from espnet.nets.pytorch_backend.nets_utils import make_pad_mask
  from espnet.nets.pytorch_backend.transformer.attention import MultiHeadedAttention
  from espnet.nets.pytorch_backend.transformer.decoder_layer import DecoderLayer
  from espnet.nets.pytorch_backend.transformer.embedding import PositionalEncoding
  from espnet.nets.pytorch_backend.transformer.layer_norm import LayerNorm
  from espnet.nets.pytorch_backend.transformer.positionwise_feed_forward import PositionwiseFeedForward
  from espnet.nets.pytorch_backend.transformer.repeat import repeat
label_desc: Use image node_id 1 to create a new MLMDecoder object from inherited base classes: AbsDecoder with example: obj = MLMDecoder(vocab_size, encoder_output_size, attention_heads, linear_units, num_blocks, dropout_rate, positional_dropout_rate, _attention_dropout_rate, src_attention_dropout_rate, input_layer, use_output_layer, pos_enc_class, normalize_before, concat_after)