aibedo.models.BaseModel.predict
- BaseModel.predict(X: torch.Tensor, **kwargs) Dict[str, torch.Tensor][source]
This should be the main method to use for making predictions.
- Parameters
X (Tensor) – Input data tensor of shape \((B, *, C_{in})\). This is the same tensor one would use in
forward(), except for (potentially) auxiliary inputs (e.g. the month of the outputs) that will be transformed or removed before passing to the model throughforward().**kwargs – Additional keyword arguments to be passed to
postprocess_raw_predictions()
- Returns
Dict[str, Tensor] – The model predictions (in a post-processed format), i.e. a dictionary output_var -> output_var_prediction, where each output_var_prediction is a Tensor of shape \((B, *)\) in original-scale (e.g. in Kelvin for temperature), and non-negativity has been enforced for variables such as precipitation.
- Shapes:
Input: \((B, *, C_{in})\)
Output: Dict \(k_i\) -> \(v_i\), and each \(v_i\) has shape \((B, *)\) for \(i=1,..,C_{out}\),
where \(B\) is the batch size, \(*\) is the spatial dimension(s) of the data, and \(C_{out}\) is the number of output features.