Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add flow priors to VAE #18

Open
DylanMannKrzisnik opened this issue Jan 27, 2022 · 2 comments
Open

How to add flow priors to VAE #18

DylanMannKrzisnik opened this issue Jan 27, 2022 · 2 comments

Comments

@DylanMannKrzisnik
Copy link

Hello,

What would be the simplest way of replacing a Gaussian prior for VAE with a flow-based one?

Thanks

@didriknielsen
Copy link
Owner

Hi,

I'd say the simplest would be to start from e.g. this example:
https://github.com/didriknielsen/survae_flows/blob/master/examples/mnist_vae.py
and add some bijective transformations after the VAE on line 50 (the layers are specified from data to latent, i.e. x -> z).

Alternatively, and equivalently, you can replace the base_distribution with a Flow.

Hope this helps. If it's not clear I post an example later.

Didrik

@DylanMannKrzisnik
Copy link
Author

Thanks for your response, I had opted for the second option of replacing the base_distribution with a Flow. Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants