I’m confused about the Example: Mixing Optimizers docs
https://pyro.ai/examples/custom_objectives.html#Example:-Mixing-Optimizers
In
adam = torch.optim.Adam(adam_parameters, {"lr": 0.001, "betas": (0.90, 0.999)})
sgd = torch.optim.SGD(sgd_parameters, {"lr": 0.0001})
loss_fn = pyro.infer.Trace_ELBO().differentiable_loss
# compute loss
loss = loss_fn(model, guide)
loss.backward()
# take a step and zero the parameter gradients
adam.step()
sgd.step()
adam.zero_grad()
sgd.zero_grad()
What are adam_parameters
and sgd_parameters
? The string labels given to pyro.param? A list of them?
Also, where do the arguments for model/guide go?
I have been using pyro.infer.svi.SVI.step(data,dictionary)
, where we model
/guide
are called as model/guide(data,dictionary)
, but now want to use different step sizes and a custom learning schedule, and am wondering where to pass data and dictionary.