aibedo.models.BaseModel.raw_predict

BaseModel.raw_predict(X: torch.Tensor) Dict[str, torch.Tensor][source]

Predict the raw (normalized) output of the model, splitted into a dict by output variable. To get the predictions with post-processing (e.g. non-negativity, denormalization), please use predict() instead.

Parameters

X (Tensor) – Input data tensor of shape \((B, *, C_{in})\), where * refers to the spatial dimension(s) of the data. 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 through forward().

Returns

Dict[str, Tensor] – A dictionary with \(C_{out}\) entries of tensors of shape \((B, *)\). E.g. ‘pr_pre’, ‘tas_pre’ (or ‘pre_nonorm’, ‘tas_nonorm’) will all be the keys to the respective predicted tensor. Note that these predictions are in normalized scale.

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,