maho3 / ltu-ili

Robust ML in Astro
https://ltu-ili.readthedocs.io/en/latest/
46 stars 9 forks source link

81 add variational inference posteriors #92

Closed maho3 closed 11 months ago

maho3 commented 1 year ago

Adds a VISampler to samplers.py, allowing for variational inference sampling with the sbi backend.

On a Macbook, the VISampler is only marginally faster than Pyro MCMC for the toy example (9 min vs 10 min for PosteriorCoverage). However, it is expected to be faster for higher-dimensional posteriors, especially when using GPU.

DeaglanBartlett commented 1 year ago

Nice work! To make checking this PR easier, please can you add an example to the unit tests which uses the VI sampler?