class_docstr: Autoformer encoder layer with the progressive decomposition architecture
class_docstr_tok: ["Autoformer","encoder","layer","with","the","progressive","decomposition","architecture"]
code: def forward(self, x, attn_mask=None):
      new_x, attn = self.attention(x, x, x, attn_mask=attn_mask)
      x = x + self.dropout(new_x)
      x, _ = self.decomp1(x)
      y = x
      y = self.dropout(self.activation(self.conv1(y.transpose(-1, 1))))
      y = self.dropout(self.conv2(y).transpose(-1, 1))
      res, _ = self.decomp2(x + y)
      return res, attn
  
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the EncoderLayer obj's underlying member method code with example usage: obj.forward(x, attn_mask) and returns: res,  attn