Dummy Torch Model¶
A dummy model specifically for unit and integration testing purposes
-
class
flood_forecast.transformer_xl.dummy_torch.
DummyTorchModel
(forecast_length: int)[source]¶ -
__init__
(forecast_length: int)[source]¶ A dummy model that will return a tensor of ones (batch_size, forecast_len)
- Parameters
forecast_length (int) – The length to forecast
-
forward
(x: torch.Tensor) → torch.Tensor[source]¶ The forward pass for the dummy model :param x: Here the data is irrelvant. Only batch_size is grabbed :type x: torch.Tensor :param mask: [description], defaults to None :type mask: [type], optional :return: [description] :rtype: torch.Tensor
-
training
: bool¶
-