timesead.models.layers.autoformer_encdec ======================================== .. py:module:: timesead.models.layers.autoformer_encdec Classes ------- .. autoapisummary:: timesead.models.layers.autoformer_encdec.CustomLayerNorm timesead.models.layers.autoformer_encdec.MovingAvg timesead.models.layers.autoformer_encdec.SeriesDecomp timesead.models.layers.autoformer_encdec.EncoderLayer timesead.models.layers.autoformer_encdec.Encoder Module Contents --------------- .. py:class:: CustomLayerNorm(channels) Bases: :py:obj:`torch.nn.Module` Special designed layernorm for the seasonal part Initialize internal Module state, shared by both nn.Module and ScriptModule. .. py:attribute:: layernorm .. py:method:: forward(x) .. py:class:: MovingAvg(kernel_size, stride) Bases: :py:obj:`torch.nn.Module` Moving average block to highlight the trend of time series Initialize internal Module state, shared by both nn.Module and ScriptModule. .. py:attribute:: kernel_size .. py:attribute:: avg .. py:method:: forward(x) .. py:class:: SeriesDecomp(kernel_size) Bases: :py:obj:`torch.nn.Module` Series decomposition block Initialize internal Module state, shared by both nn.Module and ScriptModule. .. py:attribute:: moving_avg .. py:method:: forward(x) .. py:class:: EncoderLayer(attention, d_model, d_ff=None, moving_avg=25, dropout=0.1, activation='relu') Bases: :py:obj:`torch.nn.Module` Autoformer encoder layer with the progressive decomposition architecture Initialize internal Module state, shared by both nn.Module and ScriptModule. .. py:attribute:: attention .. py:attribute:: conv1 .. py:attribute:: conv2 .. py:attribute:: decomp1 .. py:attribute:: decomp2 .. py:attribute:: dropout .. py:attribute:: activation .. py:method:: forward(x, attn_mask=None) .. py:class:: Encoder(attn_layers, conv_layers=None, norm_layer=None) Bases: :py:obj:`torch.nn.Module` Autoformer encoder Initialize internal Module state, shared by both nn.Module and ScriptModule. .. py:attribute:: attn_layers .. py:attribute:: conv_layers .. py:attribute:: norm :value: None .. py:method:: forward(x, attn_mask=None)