class_docstr: Represents a Transformer decoder layer as described in
  :cite:t:`https://doi.org/10.48550/arxiv.1706.03762`.
class_docstr_tok: ["Represents","a","Transformer","decoder","layer","as","described","in",":","cite",":","t",":","`","https",":","\/\/doi.org\/10.48550\/arxiv.1706.03762","`","."]
code: def forward(
      self,
      seqs: Tensor,
      padding_mask: Optional[PaddingMask],
      self_attn_mask: Optional[AttentionMask] = None,
      encoder_output: Optional[Tensor] = None,
      encoder_padding_mask: Optional[PaddingMask] = None,
      *,
      state_bag: Optional[IncrementalStateBag] = None,
  ) -> Tuple[Tensor, Optional[PaddingMask]]:
      seqs = self._forward_self_attn(
          seqs, padding_mask, self_attn_mask, state_bag
      )
  
      seqs = self._forward_encoder_decoder_attn(
          seqs,
          padding_mask,
          encoder_output,
          encoder_padding_mask,
          state_bag,
      )
  
      seqs = self._forward_ffn(seqs)
  
      return seqs, padding_mask
  
imports: from abc import ABC, abstractmethod
  from typing import Optional, Tuple, cast, final
  import torch
  import torch.nn
  from torch import Tensor
  from torch.nn import Dropout, Module
  from torch.nn.parameter import Parameter
  from fairseq2.nn.incremental_state import IncrementalStateBag
  from fairseq2.nn.normalization import LayerNorm
  from fairseq2.nn.padding import PaddingMask
  from fairseq2.nn.transformer.attention_mask import AttentionMask
  from fairseq2.nn.transformer.ffn import FeedForwardNetwork
  from fairseq2.nn.transformer.layer_norm import LayerNormFactory, create_standard_layer_norm
  from fairseq2.nn.transformer.multihead_attention import MultiheadAttention
  from fairseq2.nn.transformer.norm_order import TransformerNormOrder
  from fairseq2.typing import DataType, Device, finaloverride
label_desc: Use image node_id 3 for calling the StandardTransformerDecoderLayer obj's underlying member method code with example usage: obj.forward(seqs, padding_mask, _attn_mask, encoder_output, encoder_padding_mask) and returns: seqs,  padding_mask