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

Question about loss equation from blog #9

Open
gunshi opened this issue Apr 14, 2019 · 1 comment
Open

Question about loss equation from blog #9

gunshi opened this issue Apr 14, 2019 · 1 comment

Comments

@gunshi
Copy link

gunshi commented Apr 14, 2019

loss
Hi,
Comparing the explicit GMM VAE code with the loss equation from the blog, I'm confused about the missing term :
$\mathbb{E}_{q(y, z | x)} [\ln \frac{p(y)}{q(y | x)} ] $
(expectation of log(p(y)/q(y|x))-- the first term)
from the loss calculation here:

def labeled_loss(x, px_logit, z, zm, zv, zm_prior, zv_prior):

loss = tf.add_n([nent] + [qy[:, i] * losses[i] for i in xrange(k)])

and in the notebook as well.
It would be great if you could clarify the reason for that
Thanks

@gunshi gunshi changed the title Question of loss equation from blog Question about loss equation from blog Apr 15, 2019
@JerryPeng21cuhk
Copy link

Have a look at variable: nent in line 56 of file gmvae_k.py and line 34 of function: labeled_loss

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