class_docstr: Autoformer encoder
class_docstr_tok: ["Autoformer","encoder"]
code: def forward(self, x, attn_mask=None):
      attns = []
      if self.conv_layers is not None:
          for attn_layer, conv_layer in zip(
              self.attn_layers, self.conv_layers
          ):
              x, attn = attn_layer(x, attn_mask=attn_mask)
              x = conv_layer(x)
              attns.append(attn)
          x, attn = self.attn_layers[-1](x)
          attns.append(attn)
      else:
          for attn_layer in self.attn_layers:
              x, attn = attn_layer(x, attn_mask=attn_mask)
              attns.append(attn)
  
      if self.norm is not None:
          x = self.norm(x)
  
      return x, attns
  
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the Encoder obj's underlying member method code with example usage: obj.forward(x, attn_mask) and returns: x,  attns