Sorry if this is inconvenient, I am a newbie to Pyro. I finished building a generative model in Pytorch, and am preparing the training loop. However, I found that training requires methods available in pyro.infer. How would I be implement a genetic algorithm (or any gradient free optimizer) using Pyro?
Standard pyro.infer.SVI
and pyro.infer.Trace_ELBO
should work even when gradients are not available (although learning will be very slow). This is how inference works for discrete random variables. We also have some baseline-learning algorithms in TraceGraph_ELBO
, which can speed up training in non-differentiable models.