noether.core.callbacks.default.lr¶
Classes¶
Callback to log the learning rate of the optimizer. |
Module Contents¶
- class noether.core.callbacks.default.lr.LrCallback(callback_config, trainer, model, data_container, tracker, log_writer, checkpoint_writer, metric_property_provider, name=None)¶
Bases:
noether.core.callbacks.periodic.PeriodicCallbackCallback to log the learning rate of the optimizer.
Initializes the PeriodicCallback.
- Parameters:
callback_config (noether.core.schemas.callbacks.CallBackBaseConfig) – Configuration of the PeriodicCallback. Implements the CallBackBaseConfig schema.
trainer (noether.training.trainers.BaseTrainer) – Trainer of the current run, subclass of SgdTrainer.
model (noether.core.models.ModelBase) – Model of the current run.
data_container (noether.data.container.DataContainer) – DataContainer instance that provides access to all datasets.
tracker (noether.core.trackers.BaseTracker) – Tracker instance to log metrics to stdout/disk/online platform.
log_writer (noether.core.writers.LogWriter) – LogWriter instance to log metrics.
checkpoint_writer (noether.core.writers.CheckpointWriter) – CheckpointWriter instance to save checkpoints.
metric_property_provider (noether.core.providers.MetricPropertyProvider) – MetricPropertyProvider instance to access properties of metrics.
name (str | None) – Name of the callback.
- should_log_after_update(training_iteration)¶
Checks after every update if the PeriodicCallback should be invoked.
- Parameters:
training_iteration (noether.core.utils.training.training_iteration.TrainingIteration) – TrainingIteration to check.