You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow sampling the posterior given different x (batched) #944
Is your feature request related to a problem?
I would like to sample the posterior distribution given many x_o (amortization). This is also done in SBC. Currently, this requires a for-loop over x. I think it would be nice to have an option to sample batches of x. This should be possible for any kind of sampler we have (including VI, MCMC, Direct,...)
Describe the solution you'd like
To avoid the hassle of having to decide whether the x are supposed to be i.i.d. or multi-d or just a batch over which to amortize, I would suggest to have a separate sampling method for this, e.g. def sample_amortized()
Activity
janfb commentedon Feb 29, 2024
Note that
nflows(andsbiposteriors) enable passing a batch of conditions tosample. The return shape iswith
condition.shape=(num_conditions, x_shape).janfb commentedon Jun 18, 2024
will be fixed with #1153