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 loss #38

Closed
taynoel opened this issue Mar 12, 2023 · 1 comment
Closed

KL divergence loss #38

taynoel opened this issue Mar 12, 2023 · 1 comment

Comments

@taynoel
Copy link

taynoel commented Mar 12, 2023

Hi, thanks for the great repo
I have a question,
In the function masked_kl_div of ppo.py, shouldnt the calculation be prob1*(log(prob1) - log(prob2))?
The calculation in the code is a negative KL loss that is to be maximized instead of minimized (as assumed by the code).

@lucidrains
Copy link
Owner

@taynoel84 🤦 thank you for finding this error!

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