OneCycle Learning Rate Scheduling Callback
Source:R/CallbackSetLRScheduler.R
mlr_callback_set.lr_scheduler_one_cycle.RdChanges the learning rate based on the 1cycle learning rate policy.
Wraps torch::lr_one_cycle(), where the default values for epochs and steps_per_epoch are the number of training epochs and the number of batches per epoch.
Resuming
As for CallbackSetLRScheduler, with one additional restriction: the 1cycle policy is defined
over the total number of steps of the run, so a resumed run must be configured for the same
number of steps as the one that wrote the checkpoint, i.e. the same epochs and the same number
of batches per epoch.
A run that is not errors before its first epoch rather than somewhere in the middle.
Super classes
CallbackSet -> CallbackSetLRScheduler -> CallbackSetLRSchedulerOneCycle
Methods
CallbackSetLRSchedulerOneCycle$new()
Creates a new instance of this R6 class.
Usage
CallbackSetLRSchedulerOneCycle$new(...)CallbackSetLRSchedulerOneCycle$on_begin()
Creates the scheduler using the optimizer from the context