class_docstr: Transformer decoder consisting of *args.decoder_layers* layers. Each layer
  is a :class:`TransformerDecoderLayer`.
  
  Args:
      args (argparse.Namespace): parsed command-line arguments
      dictionary (~fairseq.data.Dictionary): decoding dictionary
      embed_tokens (torch.nn.Embedding): output embedding
      no_encoder_attn (bool, optional): whether to attend to encoder outputs
          (default: False).
class_docstr_tok: ["Transformer","decoder","consisting","of","*","args.decoder_layers","*","layers",".","Each","layer","is","a",":","class",":","`","TransformerDecoderLayer","`",".","Args",":","args","(","argparse.Namespace",")",":","parsed","command-line","arguments","dictionary","(","~fairseq.data.Dictionary",")",":","decoding","dictionary","embed_tokens","(","torch.nn.Embedding",")",":","output","embedding","no_encoder_attn","(","bool",",","optional",")",":","whether","to","attend","to","encoder","outputs","(","default",":","False",")","."]
code: def __init__(
      self, args, dictionary, embed_tokens, no_encoder_attn=False
  ):
      super().__init__(
          args, dictionary, embed_tokens, no_encoder_attn=False
      )
  
      self.dictionary = dictionary
      self.layers = nn.ModuleList([])
      self.layers.extend(
          [
              TransformerMonotonicDecoderLayer(args)
              for _ in range(args.decoder_layers)
          ]
      )
      self.policy_criterion = getattr(args, "policy_criterion", "any")
      self.num_updates = None
  
imports: from typing import Dict, List, NamedTuple, Optional
  import torch
  import torch.nn
  from examples.simultaneous_translation.modules.monotonic_transformer_layer import TransformerMonotonicDecoderLayer, TransformerMonotonicEncoderLayer
  from fairseq.models import register_model, register_model_architecture
  from fairseq.models.transformer import TransformerModel, TransformerEncoder, TransformerDecoder, base_architecture, transformer_iwslt_de_en, transformer_vaswani_wmt_en_de_big, tiny_architecture
  from torch import Tensor
label_desc: Use image node_id 1 to create a new TransformerMonotonicDecoder object from inherited base classes: TransformerDecoder with example: obj = TransformerMonotonicDecoder(args, dictionary, embed_tokens, no_encoder_attn)