public
Cos
— parametric type
Cos{T, S<:Integer}(range0, range1, period)
Cos(;λ0, λ1, period)
A cosine annealing schedule (see “SGDR: Stochastic Gradient Descent with Warm Restarts”) The output conforms to
abs(λ0 - λ1) * (1 + cos(π * mod(t - 1, period) / period)) / 2 + min(λ0, λ1)
This schedule is also referred to as “cosine annealing with warm restarts” in machine learning literature.
Arguments
range0
/λ0
: the first range endpointrange1
/λ1
: the second range endpointperiod::Integer
: the period