Skip to content

Commit 7517807

Browse files
committed
fix actor update problem
1 parent 6077858 commit 7517807

File tree

1 file changed

+1
-1
lines changed
  • contents/9_Deep_Deterministic_Policy_Gradient_DDPG

1 file changed

+1
-1
lines changed

contents/9_Deep_Deterministic_Policy_Gradient_DDPG/DDPG.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def __init__(self, sess, state_dim, action_dim, learning_rate, gamma, replacemen
119119

120120
with tf.variable_scope('Critic'):
121121
# Input (s, a), output q
122-
self.a = a
122+
self.a = tf.stop_gradient(a) # stop critic update flows to actor
123123
self.q = self._build_net(S, self.a, 'eval_net', trainable=True)
124124

125125
# Input (s_, a_), output q_ for q_target

0 commit comments

Comments
 (0)