gluonts.torch.modules.lookup_table 模块#
- 类 gluonts.torch.modules.lookup_table.LookupValues(bin_values: torch.Tensor)[源代码]#
基类:
torch.nn.modules.module.Module
一个将 bin 索引映射到值的查找表。
- 参数
bin_values – 形状为 (num_bins, ) 的 bin 值张量。
- forward(indices: torch.Tensor) torch.Tensor [源代码]#
定义每次调用时执行的计算。
应被所有子类覆盖。
注意
虽然前向传递 (forward pass) 的实现应在此函数内定义,但之后应调用
Module
实例而不是直接调用此函数,因为前者会处理注册的钩子 (hook),而后者会默默忽略它们。
- training: bool#