LIONmodel.py¶
Source: LION/models/LIONmodel.py
- class LION.models.LIONmodel.ModelInputType(value, names=_not_given, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
int,Enum
- class LION.models.LIONmodel.LIONmodel(model_parameters, geometry=None)[source]¶
Bases:
Module,ABCBase class for all models in the toolbox,
- Parameters:
model_parameters (LIONModelParameter | None)
geometry (Geometry | None)
- save(fname, **kwargs)[source]¶
Saves model given a filename. While its not enforced, the following Parameters are expected from kwargs: - ‘dataset’ : LIONParameter describing the dataset creation and handling. - ‘training’: LIONParameter describing the training algorithm and procedures - ‘geometry’: If the model itself has no scan geometry parameter, but the dataset was created with some geometry
If you want to save the model for training later (i.e. checkpoiting), use save_checkpoint()