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

SAC alpha update problem #346

Open
Shapeno opened this issue Feb 29, 2024 · 1 comment
Open

SAC alpha update problem #346

Shapeno opened this issue Feb 29, 2024 · 1 comment

Comments

@Shapeno
Copy link

Shapeno commented Feb 29, 2024

In obj_alpha = (self.alpha_log * (self.target_entropy - log_prob).detach()).mean() when alpha_log=0, alpha will be 1forever.
the correct way is obj_alpha = (self.alpha * (self.target_entropy - log_prob).detach()).mean() .

this problem is also found in rlkit.

Algorithm details in the source code of :
https://github.com/rail-berkeley/softlearning/blob/13cf187cc93d90f7c217ea2845067491c3c65464/softlearning/algorithms/sac.py#L256

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

1 participant