ocl.callbacks
FreezeParameters
Bases: Callback
Freeze parameters of model prior to training.
Source code in ocl/callbacks.py
__init__
Initialize FreezeParameters callback.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameter_groups |
List[Dict[str, Any]]
|
Parameter groups that should be frozen. Uses same syntax as ocl.optimization.OptimizationWrapper |
required |
Source code in ocl/callbacks.py
RestoreParameterSubset
Bases: Callback
Restore a subset of parameters using a checkpoint form a different model.
Source code in ocl/callbacks.py
__init__
Initialize RestoreParameterSubset callback.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
checkpoint_file |
str
|
File from which the model weights should be loaded. |
required |
target_path |
str
|
The path in the model where the model weights should be
restored. This should follow a dot separated syntax, such a |
required |
source_path |
Optional[str]
|
The path in the checkpoint_file that should be used to restore weights.
If none provided assumes to be the same as |
None
|
Source code in ocl/callbacks.py
UpdateHyperparameterScheduling
Bases: Callback
Callback to update hyperparameter schedulers found ocl.scheduling
.
Source code in ocl/callbacks.py
SetEpochEnvironmentVariable
Bases: Callback
Sets environment variable EPOCH
which is used by ocl.transforms.SampleSlices.