A cosine learning rate schedule varies the learning rate along a segment of a cosine curve. For a single decreasing segment, declare to count completed schedule advances and choose a duration . With no competing rate updates, set
It starts at , reaches the midpoint of the two bounds at , and ends at . This is the cosine segment used in SGDR; repeating such segments with restarts is an additional policy, not part of the single-segment formula.[ref]
For an original example, let , and . At the rates are approximately . Differentiating the continuous interpolation gives
Thus the rate decreases throughout the interior when the upper bound exceeds the lower bound, and its interpolation has zero slope at both ends. A smooth rate curve does not by itself prove convergence of the learning procedure.
The clock must be declared: advancing once per training epoch differs from advancing after every parameter update. The PyTorch CosineAnnealingLR documentation explicitly distinguishes its implementation without restarts from SGDR. Its example advances the scheduler after the training and validation operations. To stop at the lower bound, stop or hold the schedule at the declared endpoint; indefinitely extending the cosine formula is not a permanently decreasing rule.[ref]

Articles by others on the same topic (0)

There are currently no matching articles.