EnEmbedding#

class pytorch_forecasting.models.timexer.sub_modules.EnEmbedding(n_vars, d_model, patch_len, dropout)[source]#

Bases: Module

Encoder embedding module for time series data. Handles endogenous feature embeddings in this case. :param n_vars: Number of input features. :type n_vars: int :param d_model: Dimension of the model. :type d_model: int :param patch_len: Length of the patches. :type patch_len: int :param dropout: Dropout rate. Defaults to 0.1. :type dropout: float

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

Methods

forward(x)

Define the computation performed at every call.

forward(x)[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.