class_docstr: Transformer encoder-decoder model.
      
class_docstr_tok: ["Transformer","encoder-decoder","model","."]
code: def decode(
      self,
      dec_input,
      dec_attn_mask,
      enc_output,
      enc_attn_mask,
      dec_layer_past=None,
      dec_get_key_value=False,
      dec_self_attention_relative_position_bias=None,
      dec_cross_attention_relative_position_bias=None,
  ):
      if self.decoder is None:
          raise ValueError(
              f"Cannot call .decode(...) when self.decoder is None."
          )
      """Decodes embedder input using decoder and encoder input"""
      dec_output = self.decoder(
          dec_input=dec_input,
          dec_attn_mask=dec_attn_mask,
          layer_past=dec_layer_past,
          get_key_value=dec_get_key_value,
          enc_output=enc_output,
          enc_attn_mask=enc_attn_mask,
          dec_self_attention_relative_position_bias=dec_self_attention_relative_position_bias,
          dec_cross_attention_relative_position_bias=dec_cross_attention_relative_position_bias,
      )
  
      return dec_output
  
file_path: NeMo/nemo/collections/nlp/modules/common/megatron/megatron_encoder_decoder.py
imports: from ast import Mod
  import torch
  from nemo.collections.nlp.modules.common.megatron.hiddens import MegatronHiddensModule
  from nemo.collections.nlp.modules.common.megatron.megatron_perceiver_encoders import MegatronPerceiverEncoderModule
  from nemo.collections.nlp.modules.common.megatron.module import MegatronModule
  from nemo.collections.nlp.modules.common.megatron.utils import ApexGuardDefaults
label_desc: Use image node_id 4 for calling the MegatronTransformerEncoderDecoderModule obj's underlying member method code with example usage: obj.decode(dec_input, dec_attn_mask, enc_output, enc_attn_mask, dec_layer_past, dec_get_key_value, dec__attention_relative_position_bias, dec_cross_attention_relative_position_bias) and returns: dec_output