class_docstr: Autoformer encoder
class_docstr_tok: ["Autoformer","encoder"]
code: def forward(self, x, cross, x_mask=None, cross_mask=None, trend=None):
      for layer in self.layers:
          x, residual_trend = layer(
              x, cross, x_mask=x_mask, cross_mask=cross_mask
          )
          trend = trend + residual_trend
  
      if self.norm is not None:
          x = self.norm(x)
  
      if self.projection is not None:
          x = self.projection(x)
      return x, trend
  
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the Decoder obj's underlying member method code with example usage: obj.forward(x, cross, x_mask, cross_mask, trend) and returns: x,  trend