(self, theta: t.Tensor, insample_x_t: t.Tensor, outsample_x_t: t.Tensor)
| 194 | super().__init__() |
| 195 | |
| 196 | def forward(self, theta: t.Tensor, insample_x_t: t.Tensor, outsample_x_t: t.Tensor) -> Tuple[t.Tensor, t.Tensor]: |
| 197 | backcast_basis = insample_x_t |
| 198 | forecast_basis = outsample_x_t |
| 199 | |
| 200 | cut_point = forecast_basis.shape[1] |
| 201 | backcast = t.einsum('bp,bpt->bt', theta[:, cut_point:], backcast_basis) |
| 202 | forecast = t.einsum('bp,bpt->bt', theta[:, :cut_point], forecast_basis) |
| 203 | return backcast, forecast |
| 204 | |
| 205 | class _ExogenousBasisWavenet(nn.Module): |
| 206 | def __init__(self, out_features, in_features, num_levels=4, kernel_size=3, dropout_prob=0): |
nothing calls this directly
no outgoing calls
no test coverage detected