MCPcopy Create free account
hub / github.com/BorealisAI/scaleformer / __init__

Method __init__

models/NHitsMS.py:174–179  ·  view source on GitHub ↗
(self, backcast_size: int, forecast_size: int, interpolation_mode: str)

Source from the content-addressed store, hash-verified

172# Cell
173class _IdentityBasis(nn.Module):
174 def __init__(self, backcast_size: int, forecast_size: int, interpolation_mode: str):
175 super().__init__()
176 assert (interpolation_mode in ['linear','nearest']) or ('cubic' in interpolation_mode)
177 self.forecast_size = forecast_size
178 self.backcast_size = backcast_size
179 self.interpolation_mode = interpolation_mode
180
181 def forward(self, theta: t.Tensor, insample_x_t: t.Tensor, outsample_x_t: t.Tensor) -> Tuple[t.Tensor, t.Tensor]:
182

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected