noether.core.initializers.base

Classes

InitializerBase

Helper class that provides a standard way to create an ABC using

Module Contents

class noether.core.initializers.base.InitializerBase(path_provider)

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

Base class for model initializers.

Parameters:

path_provider (noether.core.providers.PathProvider) – PathProvider instance to access paths to load models from.

logger
path_provider
abstractmethod init_weights(model)

Initialize the model weights from the checkpoint.

Parameters:

model (noether.core.models.base.ModelBase) – the model to load the weights into.

Return type:

None

abstractmethod init_optimizer(model)

Initialize the optimizer for the model.

Parameters:

model (noether.core.models.base.ModelBase) – a model to initialize the optimizer for. Assumes the model has an attribute optim.

Return type:

None

init_trainer(trainer)

Initialize the trainer from the checkpoint.

By default, does nothing. Can be overridden by child classes.

Parameters:

trainer – the trainer to initialize.

Return type:

None

init_callbacks(callbacks, model)

Initialize the callbacks from the checkpoint.

By default, does nothing. Can be overridden by child classes.

Parameters:
Return type:

None

start_checkpoint()

Get the start checkpoint for the model.

By default , returns a TrainingIteration starting from zero.

Returns:

the start checkpoint for the model.

Return type:

checkpoint