Hi,
When using AutoGuides, the method sample_posterior
is really convenient to get samples after inference.
Is there an easy way to do the same for custom guides?
I was looking for something like the following.
def model(data): ...
def guide(data): ...
svi = SVI(model, guide, optimizer, loss=Trace_ELBO())
svi_result = svi.run(rng_key, 20000, data)
sample_posterior(guide, rng_key, svi_result.params, sample_shape=(100,))
Is that already possible?