gluonts.torch.model.patch_tst.lightning_module module#
- class gluonts.torch.model.patch_tst.lightning_module.PatchTSTLightningModule(model_kwargs: dict, lr: float = 0.001, weight_decay: float = 1e-08)[source]#
Bases:
lightning.pytorch.core.module.LightningModule
A
pl.LightningModule
class that can be used to train aPatchTSTModel
with PyTorch Lightning.This is a thin layer around a (wrapped)
PatchTSTModel
object, that exposes the methods to evaluate training and validation loss.- Parameters
model_kwargs – Keyword arguments to construct the
PatchTSTModel
to be trained.loss – Loss function to be used for training.
lr – Learning rate.
weight_decay – Weight decay regularization parameter.