class_docstr: Transformer Decoder Layer.
  
  Args:
      d_model (int): The number of expected features
          in the decoder inputs (default=512).
      d_inner (int): The dimension of the feedforward
          network model (default=256).
      n_head (int): The number of heads in the
          multiheadattention models (default=8).
      d_k (int): Total number of features in key.
      d_v (int): Total number of features in value.
      dropout (float): Dropout layer on attn_output_weights.
      qkv_bias (bool): Add bias in projection layer. Default: False.
      act_cfg (dict): Activation cfg for feedforward module.
      operation_order (tuple[str]): The execution order of operation
          in transformer. Such as ('self_attn', 'norm', 'enc_dec_attn',
          'norm', 'ffn', 'norm') or ('norm', 'self_attn', 'norm',
          'enc_dec_attn', 'norm', 'ffn').
          Default：None.
code: def forward(
      self,
      dec_input,
      enc_output,
      self_attn_mask=None,
      dec_enc_attn_mask=None,
  ):
      if self.operation_order == (
          "self_attn",
          "norm",
          "enc_dec_attn",
          "norm",
          "ffn",
          "norm",
      ):
          dec_attn_out = self.self_attn(
              dec_input, dec_input, dec_input, self_attn_mask
          )
          dec_attn_out += dec_input
          dec_attn_out = self.norm1(dec_attn_out)
  
          enc_dec_attn_out = self.enc_attn(
              dec_attn_out, enc_output, enc_output, dec_enc_attn_mask
          )
          enc_dec_attn_out += dec_attn_out
          enc_dec_attn_out = self.norm2(enc_dec_attn_out)
  
          mlp_out = self.mlp(enc_dec_attn_out)
          mlp_out += enc_dec_attn_out
          mlp_out = self.norm3(mlp_out)
      elif self.operation_order == (
          "norm",
          "self_attn",
          "norm",
          "enc_dec_attn",
          "norm",
          "ffn",
      ):
          dec_input_norm = self.norm1(dec_input)
          dec_attn_out = self.self_attn(
              dec_input_norm,
              dec_input_norm,
              dec_input_norm,
              self_attn_mask,
          )
          dec_attn_out += dec_input
  
          enc_dec_attn_in = self.norm2(dec_attn_out)
          enc_dec_attn_out = self.enc_attn(
              enc_dec_attn_in, enc_output, enc_output, dec_enc_attn_mask
          )
          enc_dec_attn_out += dec_attn_out
  
          mlp_out = self.mlp(self.norm3(enc_dec_attn_out))
          mlp_out += enc_dec_attn_out
  
      return mlp_out
  
file_path: mmocr/mmocr/models/common/layers/transformer_layers.py
imports: import torch.nn
  from mmengine.model import BaseModule
  from mmocr.models.common.modules import MultiHeadAttention, PositionwiseFeedForward
label_desc: Use image node_id 2 for calling the TFDecoderLayer obj's underlying member method code with example usage: obj.forward(dec_input, enc_output, _attn_mask, dec_enc_attn_mask) and returns: mlp_out