TrainingCallback
- class TrainingCallback[source]
Bases:
object
An interface for training callbacks.
Initialize the callback.
Attributes Summary
The loss, accessed via the training loop.
The model, accessed via the training loop.
The optimizer, accessed via the training loop.
The result tracker, accessed via the training loop.
The training loop.
Methods Summary
on_batch
(epoch, batch, batch_loss, **kwargs)Call for training batches.
post_batch
(epoch, batch, **kwargs)Call for training batches.
post_epoch
(epoch, epoch_loss, **kwargs)Call after epoch.
post_train
(losses, **kwargs)Call after training.
pre_step
(**kwargs)Call before the optimizer's step.
register_training_loop
(training_loop)Register the training loop.
Attributes Documentation
- loss
The loss, accessed via the training loop.
- Return type
Loss
- optimizer
The optimizer, accessed via the training loop.
- Return type
Optimizer
- result_tracker
The result tracker, accessed via the training loop.
- Return type
- training_loop
The training loop.
Methods Documentation