timesead.models.layers.autoformer_encdec
Classes
Special designed layernorm for the seasonal part |
|
Moving average block to highlight the trend of time series |
|
Series decomposition block |
|
Autoformer encoder layer with the progressive decomposition architecture |
|
Autoformer encoder |
Module Contents
- class timesead.models.layers.autoformer_encdec.CustomLayerNorm(channels)
Bases:
torch.nn.ModuleSpecial 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.ModuleMoving 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.ModuleSeries 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.ModuleAutoformer 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)