maho3 / ltu-ili

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

81 add variational inference posteriors #92

Closed maho3 closed 9 months ago

maho3 commented 10 months 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 9 months ago

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