timesead.models.layers.autoformer_encdec

Classes

CustomLayerNorm

Special designed layernorm for the seasonal part

MovingAvg

Moving average block to highlight the trend of time series

SeriesDecomp

Series decomposition block

EncoderLayer

Autoformer encoder layer with the progressive decomposition architecture

Encoder

Autoformer encoder

Module Contents

class timesead.models.layers.autoformer_encdec.CustomLayerNorm(channels)

Bases: torch.nn.Module

Special designed layernorm for the seasonal part

Initialize internal Module state, shared by both nn.Module and ScriptModule.

layernorm
forward(x)
class timesead.models.layers.autoformer_encdec.MovingAvg(kernel_size, stride)

Bases: torch.nn.Module

Moving average block to highlight the trend of time series

Initialize internal Module state, shared by both nn.Module and ScriptModule.

kernel_size
avg
forward(x)
class timesead.models.layers.autoformer_encdec.SeriesDecomp(kernel_size)

Bases: torch.nn.Module

Series decomposition block

Initialize internal Module state, shared by both nn.Module and ScriptModule.

moving_avg
forward(x)
class timesead.models.layers.autoformer_encdec.EncoderLayer(attention, d_model, d_ff=None, moving_avg=25, dropout=0.1, activation='relu')

Bases: torch.nn.Module

Autoformer encoder layer with the progressive decomposition architecture

Initialize internal Module state, shared by both nn.Module and ScriptModule.

attention
conv1
conv2
decomp1
decomp2
dropout
activation
forward(x, attn_mask=None)
class timesead.models.layers.autoformer_encdec.Encoder(attn_layers, conv_layers=None, norm_layer=None)

Bases: torch.nn.Module

Autoformer encoder

Initialize internal Module state, shared by both nn.Module and ScriptModule.

attn_layers
conv_layers
norm = None
forward(x, attn_mask=None)