IdentityBasis#

class pytorch_forecasting.models.nhits.sub_modules.IdentityBasis(backcast_size: int, forecast_size: int, interpolation_mode: str)[source]#

Bases: Module

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

Methods

forward(backcast_theta, forecast_theta, ...)

Define the computation performed at every call.

forward(backcast_theta: Tensor, forecast_theta: Tensor, encoder_x_t: Tensor, decoder_x_t: Tensor) Tuple[Tensor, Tensor][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.