gluonts.torch.model.deepar.lightning_module module#
- class gluonts.torch.model.deepar.lightning_module.DeepARLightningModule(model: gluonts.torch.model.deepar.module.DeepARModel, loss: gluonts.torch.modules.loss.DistributionLoss = NegativeLogLikelihood(beta=0.0), lr: float = 0.001, weight_decay: float = 1e-08, patience: int = 10)[source]#
Bases:
pytorch_lightning.core.module.LightningModule
A
pl.LightningModule
class that can be used to train aDeepARModel
with PyTorch Lightning.This is a thin layer around a (wrapped)
DeepARModel
object, that exposes the methods to evaluate training and validation loss.- Parameters
model –
DeepARModel
to be trained.loss – Loss function to be used for training, default:
NegativeLogLikelihood()
.lr – Learning rate, default:
1e-3
.weight_decay – Weight decay regularization parameter, default:
1e-8
.patience – Patience parameter for learning rate scheduler, default:
10
.