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

sign of the entropy #37

Open
WeiXiongUST opened this issue Mar 8, 2023 · 1 comment
Open

sign of the entropy #37

WeiXiongUST opened this issue Mar 8, 2023 · 1 comment

Comments

@WeiXiongUST
Copy link

In the implementation of A2C, the code is

    policy_loss += self.entropy_weight * -log_prob  # entropy maximization

But I think since we are maximizing the entropy, in the loss, we shall minimize - H(p), so I guess the negative sign should be removed? I tried out this version and it significantly outperforms the current version.

@John87654
Copy link

yes. i thought the same.

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