gluonts.torch.model.lag_tst.lightning_module 模块#

class gluonts.torch.model.lag_tst.lightning_module.LagTSTLightningModule(model_kwargs: dict, lr: float = 0.001, weight_decay: float = 1e-08)[source]#

一个 pl.LightningModule 类,可用于使用 PyTorch Lightning 训练 LagTSTModel

这是 (封装的) LagTSTModel 对象的薄层封装,公开了用于评估训练和验证损失的方法。

参数

model_kwargs – 构建要训练的 LagTSTModel 的关键字参数。
  • loss – 用于训练的损失函数。

  • lr – 学习率。

  • weight_decay – 权重衰减正则化参数。

  • configure_optimizers()[source]#

返回要使用的优化器。

forward(*args, **kwargs)[source]#

torch.nn.Module.forward() 相同。

*args – 您决定传递给 forward 方法的任何参数。

model_kwargs – 构建要训练的 LagTSTModel 的关键字参数。
  • **kwargs – 关键字参数也适用。

  • 返回

您的模型输出

training_step(batch, batch_idx: int)[source]#

执行训练步骤。

validation_step(batch, batch_idx: int)[source]#

执行验证步骤。

上一页
gluonts.torch.model.lag_tst.estimator module