ksuit.initializers.resume_initializer¶
Classes¶
Initializes models/optims from a checkpoint ready for resuming training |
Module Contents¶
- class ksuit.initializers.resume_initializer.ResumeInitializer(initializer_config, **kwargs)¶
Bases:
ksuit.initializers.base.CheckpointInitializerInitializes models/optims from a checkpoint ready for resuming training
- Parameters:
initializer_config (ksuit.schemas.initializers.ResumeInitializerConfig) – configuration for the initializer. Implements the ResumeInitializerConfig schema.
**kwargs – additional arguments to pass to the parent class.
- init_weights(model)¶
Initialize the model weights from the checkpoint.
- Parameters:
model (ksuit.models.ModelBase) – the model to load the weights into.
- Return type:
None
- init_optimizer(model)¶
Initialize the optimizer for the model.
- Parameters:
model (ksuit.models.ModelBase) – a model to initialize the optimizer for.
- Return type:
None
- get_start_checkpoint()¶
Get the start checkpoint for the model.
- Returns:
the start checkpoint for the model.
- Return type:
checkpoint
- init_trainer(trainer)¶
Initialize the trainer from the checkpoint.
- Parameters:
trainer (ksuit.trainers.BaseTrainer) – the trainer to initialize.
- Return type:
None