Hello community,
I am new in using Pyro and I have a few doubts I would like to clarify. I am refracting my code which implements SVI and ELBO manually (in PyTorch) and I would like to adopt Pyro as it offers a unified interface to many variation inference methods. I have a few “conceptual” questions:
-
The prior over latent variable(s) is defined in the model and it shares the same name as the variational posterior distribution implemented in the guide. Pyro automatically fetches the prior by looking at name shared between model and guide. Is this correct?
-
Can I access to individual loss terms inside the ELBO (Trace_ELBO) loss, that is fitting term and regularisation term?
-
Can I save some user defined attributes when the model is run to save some metrics that are irrelevant to Pyro but important for the user such as training accuracy…? This avoids me to run again do an additional inference after svi.step().
Thanks in advance for clarifications and help,