I was wrong, I changed to:
    for (auto &group : optimizer.param_groups())
    {
        if(group.has_options())
        {
            auto &options = static_cast<OptimizerOptions &>(group.options());
            options.lr(options.lr() * (1.0 - rate));
        }
    }

Pascal