MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / ema_update

Method ema_update

examples/reinforcement_learning/tutorial_DDPG.py:141–149  ·  view source on GitHub ↗

Soft updating by exponential smoothing :return: None

(self)

Source from the content-addressed store, hash-verified

139 self.critic_opt = tf.optimizers.Adam(LR_C)
140
141 def ema_update(self):
142 """
143 Soft updating by exponential smoothing
144 :return: None
145 """
146 paras = self.actor.trainable_weights + self.critic.trainable_weights
147 self.ema.apply(paras)
148 for i, j in zip(self.actor_target.trainable_weights + self.critic_target.trainable_weights, paras):
149 i.assign(self.ema.average(j))
150
151 def get_action(self, s, greedy=False):
152 """

Callers 1

learnMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected