Introduction

Schedule cheatsheet

Tutorials

Interface


API Reference

public CosAnnealparametric type

CosAnneal(range, offset, period, restart)
CosAnneal(;λ0, λ1, period, restart = true)

A cosine annealing schedule (see “SGDR: Stochastic Gradient Descent with Warm Restarts”) The output conforms to

t̂ = restart ? (t - 1) : mod(t - 1, period)
abs(λ0 - λ1) * (1 + cos(π * t̂ / period)) / 2 + min(λ0, λ1)

This schedule is also referred to as “cosine annealing (with warm restarts)” in machine learning literature.

Arguments

  • range == abs(λ0 - λ1): the dynamic range (given by the endpoints)
  • offset == min(λ0, λ1): the offset / minimum value
  • period::Integer: the period
  • restart::Bool: use warm-restarts