gingerbread.neotemplate package#
Submodules#
gingerbread.neotemplate.base_central_processing module#
- class gingerbread.neotemplate.base_central_processing.CPNeoTemplate#
Bases:
Module
Central processing unit for the NeoTemplate.
- check_version()#
- load_from_checkpoint(checkpoint_path: str) NoReturn #
Load a checkpoint.
Parameters:#
- checkpoint_path: str
The path to the checkpoint.
Returns:#
None
- postprocess(data: ndarray, extras: dict[str, Any] | None = {}) ndarray #
Postprocess the data after training/val/test/predict
- Parameters:
data (dict) – the data to be postprocessed
extras (dict) –
additional arguments for preprocessing such as resolution information etc. If provided, explain in depth in the docstring of the input and the input type. Example of extras:
resolution [list]: resolution of the image, e.g. {“resolution”: [1.0, 1.0, 1.0]}
Important
Extras dictionary is something the researchers need to define. There has to be a proper explanation of what the extras dictionary is and what it contains, as shown in the example above.
- Returns:
the postprocessed data
- Return type:
np.ndarray
- predict_step(data: ndarray) ndarray #
Predict step function.
- Parameters:
data (np.ndarray) – Batch.
- Returns:
Predictions.
- Return type:
np.ndarray
- preprocess(data: ndarray, extras: dict[str, Any] | None = {}) ndarray #
Preprocess the data before training/val/test/predict
- Parameters:
data (dict) – the data to be preprocessed
extras (dict) –
additional arguments for preprocessing such as resolution information etc. If provided, explain in depth in the docstring of the input and the input type. Example of extras:
resolution [list]: resolution of the image, e.g. {“resolution”: [1.0, 1.0, 1.0]}
Important
Extras dictionary is something the researchers need to define. There has to be a proper explanation of what the extras dictionary is and what it contains, as shown in the example above.
- Returns:
the preprocessed data
- Return type:
np.ndarray