class GenericBasis(t.nn.Module):
"""
Generic basis function.
"""
def init(self, backcast_size: int, forecast_size: int):
super().init()
self.backcast_size = backcast_size
self.forecast_size = forecast_size
def forward(self, theta: t.Tensor):
return theta[:, :self.backcast_size], theta[:, -self.forecast_size:]
is it more reasonable to return a function of theta just like trendBasis and seasonalityBasis?