Skip to content

No gradient required for q_target calculation #16

@Kaustubh-Khedkar

Description

@Kaustubh-Khedkar

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions