Hi,
Did you take a look into param_group option lr ?
I have to implement a lr scheduler tomorrow, I will tell you.
Not so obvious because lr is not part of an options base class. I looked at the source code and here is what I’ve done:
template <
    typename Optimizer = torch::optim::Adam,
    typename OptimizerOptions = torch::optim::AdamOptions>
inline auto decay(
    Optimizer &optimizer,
    double rate)
    -> void
{
    for (auto &group : optimizer.param_groups())
    {
        for (auto &param : group.params())
        {
            if (!param.grad().defined())
                continue;

            auto &options = static_cast<OptimizerOptions &>(group.options());
            options.lr(options.lr() * (1.0 - rate));
        }
    }
}


I declared a spec for every of my optimizers. It works but I am not happy with this.
Pascal