SCHEDULERS#

Classes#

class utils.schedulers.CosineSchedule(optimizer, K)[source]#

Bases: _LRScheduler

cosine(base_lr)[source]#
get_lr()[source]#
class utils.schedulers.CosineSchedulerWithLinearWarmup(optimizer, base_lrs, warmup_length, steps)[source]#

Bases: _LRScheduler

get_lr()[source]#

Functions#

utils.schedulers.get_scheduler(model, args, reload_optim=True)[source]#

Returns the scheduler to be used for the current dataset. If reload_optim is True, the optimizer is reloaded from the model. This should be done at least ONCE every task to ensure that the learning rate is reset to the initial value.

Return type:

_LRScheduler