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

question #63

Open
yinshuangshuang621671 opened this issue Jun 27, 2023 · 1 comment
Open

question #63

yinshuangshuang621671 opened this issue Jun 27, 2023 · 1 comment

Comments

@yinshuangshuang621671
Copy link

May I ask a question: Why is the with torch.no_grad(): used in ppo.select_action ??

@GersiD
Copy link

GersiD commented Dec 17, 2024

If you don't use that then torch will accumulate gradients during the action selection process which can throw off the optimization step.

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