
1cycle learning-rate and momentum schedule (Geron Ch 11, morie.fn gr1cy)
Source:R/geron_ml_native.R
morie_geron_1cycle_schedule.RdPeak step is (T - 1) %/% 2; the LR is a linear interpolation over
knots (0, peak, T-1) with values (eta_min, eta_max, eta_min) and the
momentum mirrors it. T = 2 collapses the peak onto step 0, which is
the two-knot branch.
Examples
morie_geron_1cycle_schedule(0.1, 0.5, t = 1, T = 7)
#> $lr_schedule
#> [1] 0.1000000 0.2333333 0.3666667 0.5000000 0.3666667 0.2333333 0.1000000
#>
#> $momentum_schedule
#> [1] 0.9500000 0.9166667 0.8833333 0.8500000 0.8833333 0.9166667 0.9500000
#>
#> $peak_step
#> [1] 3
#>
#> $lr_at_t
#> [1] 0.2333333
#>
#> $momentum_at_t
#> [1] 0.9166667
#>
#> $eta_min
#> [1] 0.1
#>
#> $eta_max
#> [1] 0.5
#>
#> $estimate
#> [1] 0.2333333
#>
#> $n
#> [1] 7
#>
#> $method
#> [1] "1cycle learning-rate schedule (Smith 2018)"
#>