philtabor / Deep-Q-Learning-Paper-To-Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No gradient required for q_target calculation

Kaustubh-Khedkar opened this issue · comments

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?