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

No gradient required for q_target calculation #16

Open
Kaustubh-Khedkar opened this issue Jun 1, 2022 · 0 comments
Open

No gradient required for q_target calculation #16

Kaustubh-Khedkar opened this issue Jun 1, 2022 · 0 comments

Comments

@Kaustubh-Khedkar
Copy link

Hi @philtabor,
There is a possible bug in the dqn_agent.py file at line 93:

q_target = rewards + self.gamma*q_next

needs to be replaced with:

with torch.no_grad():
      q_target = rewards + self.gamma*q_next

This issue is also raised in #9 (comment)

Could you please take a look?

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