tensorflow-mnist-CVAE icon indicating copy to clipboard operation
tensorflow-mnist-CVAE copied to clipboard

the comment in vae.py is totally wrong !

Open wangpeng138375 opened this issue 6 years ago • 0 comments

`# ELBO marginal_likelihood = tf.reduce_sum(x * tf.log(x_) + (1 - x) * tf.log(1 - x_), 1) KL_divergence = 0.5 * tf.reduce_sum(tf.square(mu) + tf.square(sigma) - tf.log(1e-8 + tf.square(sigma)) - 1, 1)

marginal_likelihood = tf.reduce_mean(marginal_likelihood)
KL_divergence = tf.reduce_mean(KL_divergence)

ELBO = marginal_likelihood - KL_divergence

# minimize loss instead of maximizing ELBO
loss = -ELBO`

The result going right is just lucky.

wangpeng138375 avatar Mar 06 '19 10:03 wangpeng138375