Code for utilising VAE as means of doing exact MCMC inference in complex high-dimensional space.
Accompanying paper is πVAE: a stochastic process prior for Bayesian deep learning with MCMC
The πVAE model has 2 parts :
- Learning / encoding a stochastic prior via a VAE.
- Then using the learnt basis, and decoder network , perform inference on our data to get a posterior.
To run the code :
- Run src_py/models/pi_vae.py . To choose the the type of prior learnt, modify the training dataset, the current default is 1D GP.
- To perform inference using stan, use the file notebooks/pivae.stan by passing the model parameters learnt in the above step. An example is given in the notebooks, notebooks/pivae.stan and notebooks/run_monotonic_mcmc.ipynb