Skip to content

Commit 1880e8f

Browse files
committed
fix bug
1 parent 81fea33 commit 1880e8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contents/9_Deep_Deterministic_Policy_Gradient_DDPG/DDPG_update.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ def __init__(self, a_dim, s_dim, a_bound,):
5959
self.ct_params = tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES, scope='Critic/target')
6060

6161
# target net replacement
62-
self.soft_replace = [[tf.assign(ta, (1 - TAU) * ta + TAU * ea), tf.assign(tc, (1 - TAU) * tc + TAU * ec)]
63-
for ta, ea, tc, ec in zip(self.at_params, self.ae_params, self.ct_params, self.ce_params)]
62+
self.soft_replace = [tf.assign(t, (1 - TAU) * t + TAU * e)
63+
for t, e in zip(self.at_params + self.ct_params, self.ae_params + self.ce_params)]
6464

6565
q_target = self.R + GAMMA * q_
6666
# in the feed_dic for the td_error, the self.a should change to actions in memory

0 commit comments

Comments
 (0)