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

Why multiplying rstd instead of dividing by rstd? #390

Closed
gohsyi opened this issue Jul 27, 2024 · 1 comment
Closed

Why multiplying rstd instead of dividing by rstd? #390

gohsyi opened this issue Jul 27, 2024 · 1 comment

Comments

@gohsyi
Copy link

gohsyi commented Jul 27, 2024

setattr(item, attribute, (items[i] - mean) * rstd)

When normalizing the advantages, why multiplying the standard deviation instead of dividing by the standard deviation?

@hijkzzz
Copy link
Collaborator

hijkzzz commented Jul 27, 2024

Using rstd (the reciprocal of the standard deviation's square root) instead of 1/std is primarily to avoid numerical instability.

@hijkzzz hijkzzz closed this as completed Jul 28, 2024
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