gluonts.torch.model.d_linear.module 模块#
- class gluonts.torch.model.d_linear.module.DLinearModel(prediction_length: int, context_length: int, hidden_dimension: int, distr_output=gluonts.torch.distributions.studentT.StudentTOutput(beta=0.0), kernel_size: int = 25, scaling: str = 'mean')[source]#
- 基类: - torch.nn.modules.module.Module- 实现论文 https://arxiv.org/pdf/2205.13504.pdf 中的前馈模型的模块,并扩展用于概率预测。 - 参数
- prediction_length – 预测的时间点数。 
- context_length – 模型在预测时间之前使用的时间步数。 
- hidden_dimension – 前馈网络中最后一个隐藏层的大小。 
- distr_output – 用于评估观测值和采样预测的分布。 
 
 - describe_inputs(batch_size=1) gluonts.model.inputs.InputSpec[source]#
 - forward(past_target: torch.Tensor, past_observed_values: torch.Tensor) Tuple[Tuple[torch.Tensor, ...], torch.Tensor, torch.Tensor][source]#
- 定义每次调用时执行的计算。 - 应由所有子类覆盖。 - 注意 - 尽管前向传播的实现需要在该函数内定义,但之后应调用 - Module实例而不是该函数,因为前者负责运行已注册的钩子,而后者会静默忽略它们。
 - loss(past_target: torch.Tensor, past_observed_values: torch.Tensor, future_target: torch.Tensor, future_observed_values: torch.Tensor) torch.Tensor[source]#
 - training: bool#