I am sorry for asking lots of questions.
I have designed a training loop to train my SVI as below:
# set SVI
svi = SVI(myPyroModel, guide, optimizer, loss=Trace_ELBO())
# simple training loop
for i in range(num_iter):
svi.step()
My question is, when I train my svi in this way, does the guide and myPyroModel inside the call svi = SVI(myPyroModel, guide, optimizer, loss=Trace_ELBO()) also get trained and modified appropriately?
Note that optimization will update the values of the guide parameters in the parameter store, so that once we find good parameter values, we can use samples from the guide as posterior samples for downstream tasks.
so after I train the guide, would I be able to calculate the prediction scores by doing infer.Predictive(myPyroModel, guide=trained_guide, num_samples = 100)?