HI all!
I’d like to show the shift of posterior of a Bayesian regression before, during and after training.
Is there some (pseudo) code on how to do this? I’m using an AutoGuide and I’m not sure how to sample from it before training.
When I do this:
from pyro.contrib.autoguide import AutoDiagonalNormal
guide = AutoDiagonalNormal(model)
optim = Adam({'lr': 1e-4})
elbo = JitTrace_ELBO()
svi = SVI(model, guide, optim, loss=elbo, num_samples=1000)
guide.sample_latent() # Sample posterior to visualize.
I get:
AttributeError: 'AutoDiagonalNormal' object has no attribute 'latent_dim'
Thanks,
Druhe