ericjang/gumbel-softmax

Question regarding KL calculation

backpropper opened this issue · 2 comments

In the gumbel_softmax_vae_v2 notebook, for calculating the KL in case of Relaxed Prior, shouldn't the KL be y * (log q_y - log p_y). So the product with y is missing?

I see that its already a part the log_prob function.

@backpropper could you please explain what we don't have to multiply do p_y.log_prob(y).exp() * (q_y.log_prob(y) - p_y.log_prob(y)) ?