Skip to content
Snippets Groups Projects
Commit 4266f83b authored by Nicola Gatto's avatar Nicola Gatto
Browse files

Fix wrong variable name

parent 247b1b17
No related branches found
No related tags found
3 merge requests!20Implemented layer variables and RNN layer,!19Integrate TD3 Algorithm and Gaussian Noise,!18Integrate TD3 Algorithm and Gaussian Noise
......@@ -545,6 +545,9 @@ class DdpgAgent(Agent):
# Temporary critic so that gluon trainer does not mess
# with critic parameters
tmp_critic = self._copy_critic()
episode_avg_q_value +=\
np.sum(tmp_critic(
states, self._actor(states)).asnumpy()) / self._minibatch_size
with autograd.record():
# For maximizing qvalues we have to multiply with -1
# as we use a minimizer
......@@ -566,8 +569,6 @@ class DdpgAgent(Agent):
np.sum(critic_loss.asnumpy()) / self._minibatch_size
episode_actor_loss +=\
np.sum(actor_loss.asnumpy()) / self._minibatch_size
episode_avg_q_value +=\
np.sum(actor_qvalues.asnumpy()) / self._minibatch_size
training_steps += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment