# \donttest{
w <- ag_param(matrix(runif(4), 2, 2))
opt <- optimizer_sgd(list(w = w), lr = 0.01)
sch <- lr_scheduler_cyclic(opt, base_lr = 0.001, max_lr = 0.01,
step_size_up = 10L)
for (i in 1:40) sch$step()
# }
Run the code above in your browser using DataLab