class_docstr: Implementaion of Autoformer deep torch model.
code: def forward(
      self,
      past,
      past_timestamp,
      future_timestamp,
      enc_self_mask=None,
      dec_self_mask=None,
      dec_enc_mask=None,
      **kwargs,
  ):
      config = self.config
  
      future_timestamp = torch.cat(
          [
              past_timestamp[
                  :, (past_timestamp.shape[1] - self.start_token_len) :
              ],
              future_timestamp,
          ],
          dim=1,
      )
  
      # decomp init
      mean = (
          torch.mean(past, dim=1)
          .unsqueeze(1)
          .repeat(1, self.max_forecast_steps, 1)
      )
      zeros = torch.zeros(
          [past.shape[0], self.max_forecast_steps, past.shape[2]],
          dtype=torch.float,
          device=self.device,
      )
      seasonal_init, trend_init = self.decomp(past)
      # decoder input
      trend_init = torch.cat(
          [
              trend_init[
                  :, (trend_init.shape[1] - self.start_token_len) :, :
              ],
              mean,
          ],
          dim=1,
      )
      seasonal_init = torch.cat(
          [
              seasonal_init[
                  :,
                  (seasonal_init.shape[1] - self.start_token_len) :,
                  :,
              ],
              zeros,
          ],
          dim=1,
      )
  
      # enc
      enc_out = self.enc_embedding(past, past_timestamp)
      enc_out, attns = self.encoder(enc_out, attn_mask=enc_self_mask)
      # dec
      dec_out = self.dec_embedding(seasonal_init, future_timestamp)
      seasonal_part, trend_part = self.decoder(
          dec_out,
          enc_out,
          x_mask=dec_self_mask,
          cross_mask=dec_enc_mask,
          trend=trend_init,
      )
  
      # final
      dec_out = trend_part + seasonal_part
  
      if self.config.target_seq_index is not None:
          return dec_out[:, -self.max_forecast_steps :, :1]
      else:
          return dec_out[:, -self.max_forecast_steps :, :]
  
imports: import copy
  import logging
  import math
  import numpy
  import pandas
  from scipy.stats import norm
  from typing import List, Optional, Tuple, Union
  from abc import abstractmethod
  from merlion.models.base import NormalizingConfig
  from merlion.models.deep_base import TorchModel
  from merlion.models.forecast.deep_base import DeepForecasterConfig, DeepForecaster
  from merlion.models.utils.nn_modules import AutoCorrelation, AutoCorrelationLayer, SeriesDecomposeBlock, SeasonalLayernorm, DataEmbeddingWoPos
  from merlion.models.utils.nn_modules.enc_dec_autoformer import Encoder, Decoder, EncoderLayer, DecoderLayer
  from merlion.utils.misc import initializer
label_desc: Use image node_id 2 for calling the AutoformerModel obj's underlying member method code with example usage: obj.forward(past, past_timestamp, future_timestamp, enc__mask, dec__mask, dec_enc_mask) and returns: dec_out, dec_out