gluonts.torch.model.i_transformer.lightning_module module#
- class gluonts.torch.model.i_transformer.lightning_module.ITransformerLightningModule(model_kwargs: dict, num_parallel_samples: int = 100, lr: float = 0.001, weight_decay: float = 1e-08)[source]#
Bases:
lightning.pytorch.core.module.LightningModuleA
pl.LightningModuleclass that can be used to train aITransformerModelwith PyTorch Lightning.This is a thin layer around a (wrapped)
ITransformerModelobject, that exposes the methods to evaluate training and validation loss.- Parameters
model_kwargs – Keyword arguments to construct the
ITransformerModelto be trained.num_parallel_samples – Number of evaluation samples per time series to sample during inference.
lr – Learning rate.
weight_decay – Weight decay regularization parameter.