RuiShu/vae-clustering

Question about loss equation from blog

gunshi opened this issue · 1 comments

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

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