Skip to content

Commit 215f31c

Browse files
authored
Merge pull request MorvanZhou#125 from jiangyuzhao/bugFix
fix a bug in DDPG.py.
2 parents 97dba9b + 2c6c46d commit 215f31c

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
@@ -138,7 +138,7 @@ def __init__(self, sess, state_dim, action_dim, learning_rate, gamma, replacemen
138138
self.train_op = tf.train.AdamOptimizer(self.lr).minimize(self.loss)
139139

140140
with tf.variable_scope('a_grad'):
141-
self.a_grads = tf.gradients(self.q, a)[0] # tensor of gradients of each sample (None, a_dim)
141+
self.a_grads = tf.gradients(self.q, self.a)[0] # tensor of gradients of each sample (None, a_dim)
142142

143143
if self.replacement['name'] == 'hard':
144144
self.t_replace_counter = 0

0 commit comments

Comments
 (0)