class_docstr: Building block of Transformer decoder.
  
  Args:
      hidden_size: size of the embeddings in the model, also known as d_model
      inner_size: number of neurons in the intermediate part of feed-forward
          net, usually is (4-8 x hidden_size) in the papers
      num_attention_heads: number of heads in multi-head attention
      attn_score_dropout: probability of dropout applied to attention scores
      attn_layer_dropout: probability of dropout applied to the output of the
          attention layers, but before layer normalization
      ffn_dropout: probability of dropout applied to FFN output
      hidden_act: activation function used between two linear layers in FFN
class_docstr_tok: ["Building","block","of","Transformer","decoder",".","Args",":","hidden_size",":","size","of","the","embeddings","in","the","model",",","also","known","as","d_model","inner_size",":","number","of","neurons","in","the","intermediate","part","of","feed-forward","net",",","usually","is","(","4-8","x","hidden_size",")","in","the","papers","num_attention_heads",":","number","of","heads","in","multi-head","attention","attn_score_dropout",":","probability","of","dropout","applied","to","attention","scores","attn_layer_dropout",":","probability","of","dropout","applied","to","the","output","of","the","attention","layers",",","but","before","layer","normalization","ffn_dropout",":","probability","of","dropout","applied","to","FFN","output","hidden_act",":","activation","function","used","between","two","linear","layers","in","FFN"]
code: def forward(
      self,
      decoder_query,
      decoder_mask,
      decoder_keys,
      encoder_states,
      encoder_mask,
  ):
      if self.pre_ln:
          return self.forward_preln(
              decoder_query,
              decoder_mask,
              decoder_keys,
              encoder_states,
              encoder_mask,
          )
      else:
          return self.forward_postln(
              decoder_query,
              decoder_mask,
              decoder_keys,
              encoder_states,
              encoder_mask,
          )
  
file_path: NeMo/nemo/collections/nlp/modules/common/transformer/transformer_decoders.py
imports: import copy
  import torch
  import torch.nn
  from nemo.collections.common.parts import form_attention_mask
  from nemo.collections.nlp.modules.common.transformer.transformer_modules import MultiHeadAttention, PositionWiseFF
label_desc: Use image node_id 4 for calling the TransformerDecoderBlock obj's underlying member method code with example usage: obj.forward(decoder_query, decoder_mask, decoder_keys, encoder_states, encoder_mask) and returns: self, self