-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix a problem in some actor-critic methods
Summary: In my previous diff that fixes the incompatibility of actor-critic methods and LSTM (D52946247), I resolved the double backward issue by summing actor and critic losses. I then computed the gradient w.r.t. this sum by calling backward(), However, for DDPG and TD3, this approach is problematic. For these two algorithms, the partial derivative of actor loss w.r.t. critic parameters should not be used to update the critic. This diff addresses this issue. Reviewed By: rodrigodesalvobraz Differential Revision: D54048016 fbshipit-source-id: 1a7e0a11fd6215263b13f5ca469125e96ab70f89
- Loading branch information
1 parent
af330a6
commit c189690
Showing
3 changed files
with
30 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters