aibedo.models.BaseModel.postprocess_raw_predictions
- BaseModel.postprocess_raw_predictions(preds_tensor: torch.Tensor, **kwargs) Dict[str, torch.Tensor][source]
Convert the raw model predictions to post-processed predictions. Post-processing includes:
denormalization (bring the predictions to the original scale)
enforcing non-negative values (e.g. for precipitation)
Splitting the predictions per target variable into a dictionary of output_var -> output_var_prediction.
- Parameters
preds_tensor (Tensor) – Raw/unprocessed predictions of shape \((B, *, C_{out})\).
**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_{out})\)
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.