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 sample from latent distribution #7

Open
crlz182 opened this issue Jul 6, 2022 · 2 comments
Open

How to sample from latent distribution #7

crlz182 opened this issue Jul 6, 2022 · 2 comments

Comments

@crlz182
Copy link

crlz182 commented Jul 6, 2022

Hello,

I was wondering how I can generate samples using the decoder network after training. In a VAE, I would just sample from the prior distribution z~N(0,1) and generate a data point using the decoder. In TriangularSylvesterVAE, however, I also have to provide hyperparameters lambda(x) that depend on the input. How can I sample from my latent distribution and generate samples from it?

I am new to normalizing flows in general and would appreciate any help.

@bfs18
Copy link

bfs18 commented Dec 1, 2022

I am also curious about this.

@bgroenks96
Copy link

Just as in a regular VAE, the latent distribution is conditional on the input. Given an input x, you would obtain a mu and sigma from the encoder, and then draw samples from this latent distribution and feed them through the decoder.

It sounds like what you want is an unconditional prior p(z), which is not possible for a flow-based VAE unless you also define a prior on the flow parameters.

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

3 participants