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

What does compute_elbo_with_multiple_samples compute? #3

Open
christophfeinauer opened this issue Jul 23, 2021 · 1 comment
Open

What does compute_elbo_with_multiple_samples compute? #3

christophfeinauer opened this issue Jul 23, 2021 · 1 comment

Comments

@christophfeinauer
Copy link

Hi, I was looking at the function compute_elbo_with_multiple_samples in pfam_msa/script/VAE_model.py.

I am a bit confused about what it is calculating: Looking at the line log_weight = (log_Pxz - log_QzGx).detach().data
it seems to me that it is calculating an approximation to

log E_q(z|x) [ p(x,z) / q(z|x) ] = log E_p(z) [ p(x|z) ] = log p(x),

which is the log probability of x and not the ELBO.

Is that correct or is there something I am not understanding?

@xqding
Copy link
Collaborator

xqding commented Jul 26, 2021

It can be understood in both ways: 1. approximation of log p(x) as you have shown. 2. an ELBO based on multiple samples (regular ELBO in vanilla VAE is based on one sample). You can see this in Equation 9 of the Importances Weighted Auto-Encoder paper.

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