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

KL divergence term #6

Open
izaskr opened this issue Jul 5, 2019 · 1 comment
Open

KL divergence term #6

izaskr opened this issue Jul 5, 2019 · 1 comment

Comments

@izaskr
Copy link

izaskr commented Jul 5, 2019

I was wondering what exactly this line in the KLD calculation does:
log_ratio = torch.log(qy * categorical_dim + 1e-20)

In the definition of the ELBO loss, the KLD should be computed between the variational distribution q(z|x) and the prior p(z). How come you did not simply use the pytorch implementation of KLD (kl_div)?

@patrick-g-zhang
Copy link

Hi, I think it is the KL div between uniform distribution and posterior.

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