Hybrid model
- class hy2dl.modelzoo.hybrid.Hybrid(cfg: Config)
Bases:
ModuleWrapper to combine a deep learning model with a conceptual hydrological models [1].
Hybrid model in which a conceptual hydrological model is parameterized using a LSTM network.
- Parameters:
cfg (Config) – Configuration file.
References
- forward(sample: dict[str, Tensor | dict[str, Tensor]]) dict[str, Tensor]
Forward pass on hybrid model.
In the forward pass, each element of the batch is associated with a basin. Therefore, the conceptual model is done to run multiple basins in parallel, and also multiple entities of the model at the same time.
- Parameters:
sample (dict[str, torch.Tensor]) – Dictionary with the different tensors that will be used for the forward pass.
- Returns:
pred
- Return type:
dict[str, torch.Tensor]