class_docstr: Autoformer decoder layer with the progressive decomposition architecture
class_docstr_tok: ["Autoformer","decoder","layer","with","the","progressive","decomposition","architecture"]
code: def __init__(
      self,
      self_attention,
      cross_attention,
      d_model,
      c_out,
      d_ff=None,
      moving_avg=25,
      dropout=0.1,
      activation="relu",
  ):
      super(DecoderLayer, self).__init__()
      d_ff = d_ff or 4 * d_model
      self.self_attention = self_attention
      self.cross_attention = cross_attention
      self.conv1 = nn.Conv1d(
          in_channels=d_model,
          out_channels=d_ff,
          kernel_size=1,
          bias=False,
      )
      self.conv2 = nn.Conv1d(
          in_channels=d_ff,
          out_channels=d_model,
          kernel_size=1,
          bias=False,
      )
      self.decomp1 = SeriesDecomposeBlock(moving_avg)
      self.decomp2 = SeriesDecomposeBlock(moving_avg)
      self.decomp3 = SeriesDecomposeBlock(moving_avg)
      self.dropout = nn.Dropout(dropout)
      self.projection = nn.Conv1d(
          in_channels=d_model,
          out_channels=c_out,
          kernel_size=3,
          stride=1,
          padding=1,
          padding_mode="circular",
          bias=False,
      )
      self.activation = F.relu if activation == "relu" else F.gelu
  
file_path: merlion/merlion/models/utils/nn_modules/enc_dec_autoformer.py
imports: from merlion.models.utils.nn_modules.blocks import SeriesDecomposeBlock, MovingAverageBlock
label_desc: Use image node_id 1 to create a new DecoderLayer object from inherited base classes: nn with example: obj = DecoderLayer(_attention, cross_attention, d_model, c_out, d_ff, moving_avg, dropout, activation)