-
Notifications
You must be signed in to change notification settings - Fork 929
Added Polyak update rate for soft DQN target network updates #347
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
Conversation
…la and Atari implementations)
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
vwxyzjn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR. Could you add a note in implementation details section in the documentation /docs/rl-algorithms/dqn.md about that we implement target network update as a polyak update?
|
Sure! I have updated the documentation. Please let me know if you need anything else 😃 |
vwxyzjn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the docs. I just realized this — would you mind adding the same --tau argument to dqn_jax.py and dqn_atari_jax.py? I think you just need to replace
Line 237 in 30381ee
| q_state = q_state.replace(target_params=optax.incremental_update(q_state.params, q_state.target_params, 1)) |
q_state = q_state.replace(target_params=optax.incremental_update(q_state.params, q_state.target_params, args.tau))
Similarly, please update docs to reflect this change.
|
Thanks for the contribution! @manjavacas |
|
This PR closes #346. |
Thanks to you for this great project! |
Description
According to #346, the Polyak update rate (
tau) has been included as an argument todqn.pyanddqn_atari.pyimplementations.It will allow soft updates of the target network, as already done for
dqn_jax.py.Types of changes
Checklist:
pre-commit run --all-filespasses (required).mkdocs serve.If you are adding new algorithm variants or your change could result in performance difference, you may need to (re-)run tracked experiments. See #137 as an example PR.
--capture-videoflag toggled on (required).mkdocs serve.