timesead.models.reconstruction.fedformer

Classes

FEDformer

FEDformer performs the attention mechanism on frequency domain and achieved O(N) complexity

Module Contents

class timesead.models.reconstruction.fedformer.FEDformer(window_size: int, input_dim: int, moving_avg: int = 25, model_dim: int = 128, dropout: float = 0.1, num_heads: int = 8, fcn_dim: int = 128, activation: str = 'gelu', encoder_layers: int = 3, version: str = 'fourier', mode_select: str = 'random', modes: int = 32)

Bases: timesead.models.BaseModel

FEDformer performs the attention mechanism on frequency domain and achieved O(N) complexity Paper link: https://proceedings.mlr.press/v162/zhou22g.html

version: str, for FEDformer, there are two versions to choose, options: [Fourier, Wavelets]. mode_select: str, for FEDformer, there are two mode selection method, options: [random, low]. modes: int, modes to be selected.

Parameters:
  • window_size (int)

  • input_dim (int)

  • moving_avg (int)

  • model_dim (int)

  • dropout (float)

  • num_heads (int)

  • fcn_dim (int)

  • activation (str)

  • encoder_layers (int)

  • version (str)

  • mode_select (str)

  • modes (int)

seq_len
version = 'fourier'
mode_select = 'random'
modes = 32
decomp
enc_embedding
encoder
projection
forward(inputs: Tuple[torch.Tensor, Ellipsis]) Tuple[torch.Tensor, Ellipsis]
Parameters:

inputs (Tuple[torch.Tensor, Ellipsis])

Return type:

Tuple[torch.Tensor, Ellipsis]