code: def __init__(
      self,
      d_model,
      nhead,
      dim_feedforward=2048,
      dropout=0.1,
      activation="relu",
      normalize_before=False,
  ):
      super(TransformerDecoderLayer, self).__init__()
      self.self_attn = nn.MultiheadAttention(
          d_model, nhead, dropout=dropout
      )
      self.multihead_attn = nn.MultiheadAttention(
          d_model, nhead, dropout=dropout
      )
      # Implementation of Feedforward model
      self.linear1 = nn.Linear(d_model, dim_feedforward)
      self.dropout = nn.Dropout(dropout)
      self.linear2 = nn.Linear(dim_feedforward, d_model)
  
      self.norm1 = nn.LayerNorm(d_model)
      self.norm2 = nn.LayerNorm(d_model)
      self.norm3 = nn.LayerNorm(d_model)
      self.dropout1 = nn.Dropout(dropout)
      self.dropout2 = nn.Dropout(dropout)
      self.dropout3 = nn.Dropout(dropout)
  
      self.activation = _get_activation_fn(activation)
      self.normalize_before = normalize_before
  
imports: import copy
  from typing import Dict, List, Optional, Sequence, Union
  import torch
  import torch.nn.functional
  from torch import Tensor, nn
  from mmocr.models.common import Dictionary
  from mmocr.models.textrecog.decoders import BaseDecoder
  from mmocr.registry import MODELS
  from mmocr.utils.typing_utils import TextSpottingDataSample
  from .position_embedding import PositionEmbeddingSine
label_desc: Use image node_id 1 to create a new TransformerDecoderLayer object from inherited base classes: nn with example: obj = TransformerDecoderLayer(d_model, nhead, dim_feedforward, dropout, activation, normalize_before)