Cosine lr schedule
mighty.mighty_meta.cosine_lr_schedule
#
Cosine LR Schedule with optional warm restarts.
CosineLRSchedule
#
CosineLRSchedule(
initial_lr,
num_decay_steps,
min_lr=0,
restart_every=10000,
restart_multiplier=1.2,
)
Bases: MightyMetaComponent
Cosine LR Schedule with optional warm restarts.
:param initial_lr: Initial maximal LR :param num_decay_steps: Length of schedule in steps :param min_lr: Minimal LR :param restart_every: Restart frequency :param restart multiplier: Multiplies current learning rate on restart. :return:
Source code in mighty/mighty_meta/cosine_lr_schedule.py
adapt_lr
#
Adapt LR on step.
:param metrics: Dict of current metrics :return:
Source code in mighty/mighty_meta/cosine_lr_schedule.py
post_episode
#
Execute methods at the end of an episode.
:param metrics: Current metrics dict :return:
post_step
#
Execute methods after a step.
:param metrics: Current metrics dict :return:
post_update
#
Execute methods after the update.
:param metrics: Current metrics dict :return:
pre_episode
#
Execute methods before an episode.
:param metrics: Current metrics dict :return:
pre_step
#
Execute methods before a step.
:param metrics: Current metrics dict :return:
pre_update
#
Execute methods before the update.
:param metrics: Current metrics dict :return: