Trainer#

class ivy_builder.abstract.trainer.Trainer(spec)[source]#

Bases: object

__init__(spec)[source]#
close()[source]#

Close this trainer, and destroy all child objects or processes which may not be garbage collected.

Return type:

None

property learning_rate#
property moving_average_loss#
restore(checkpoint_path, global_step=None)[source]#

restore the network weights from checkpoint file :type checkpoint_path: str :param checkpoint_path: path of the checkpoint file for loading the weights :type global_step: Optional[int] :param global_step: training step to start at for continued training (default: None)

Return type:

None

save(checkpoint_path)[source]#

save the network weights and optimizer state in checkpoint file :type checkpoint_path: str :param checkpoint_path: path of the checkpoint file for saving the weights and optimizer state

Return type:

None

setup()[source]#

setup the trainer, ready for training

Return type:

None

property spec#
train(starting_iteration=None, total_iterations=None)[source]#

run the trainer, returning the iteration step reached

Return type:

None

visualize()[source]#

run the trainer, but without weight optimization. Only used for tensorboard visualization

Return type:

None