otx.api.entities.optimization_parameters#
This module implements the OptimizationParameters entity.
Functions
|
This is the default progress callback for OptimizationParameters. |
This is the default save model callback for OptimizationParameters. |
Classes
|
Optimization parameters. |
- class otx.api.entities.optimization_parameters.OptimizationParameters(resume: bool = False, update_progress: ~typing.Callable[[int, float | None], ~typing.Any] = <function default_progress_callback>, save_model: ~typing.Callable[[], None] = <function default_save_model_callback>)[source]#
Bases:
object
Optimization parameters.
- resume (bool): Set to
True
if optimization must be resume with the optimizer state; set to
False
to discard the optimizer state and start with fresh optimizer
update_progress (Callable[int], None): Callback which can be used to provide updates about the progress of a task. save_model (Callable[List, None]): Callback to notify that the model weights have been changed.
This callback can be used by the task when temporary weights should be saved (for instance, at the end of an epoch). If this callback has been used to save temporary weights, those weights will be used to resume optimization if for some reason training was suspended.
- save_model()#
This is the default save model callback for OptimizationParameters.
- resume (bool): Set to