Skip to content

Instantly share code, notes, and snippets.

@sol0invictus
Created May 30, 2020 17:00
Show Gist options
  • Save sol0invictus/da62a6e0070f9bf3c3db2173cc733481 to your computer and use it in GitHub Desktop.
Save sol0invictus/da62a6e0070f9bf3c3db2173cc733481 to your computer and use it in GitHub Desktop.
DDPG - target update
## Updating both netwokrs
## updating Critic network
temp1 = np.array(q_mu_target.get_weights())
temp2 = np.array(q_mu.get_weights())
temp3 = decay*temp1 + (1-decay)*temp2
q_mu_target.set_weights(temp3)
# updating Actor network
temp1 = np.array(mu_target.get_weights())
temp2 = np.array(mu.get_weights())
temp3 = decay*temp1 + (1-decay)*temp2
mu_target.set_weights(temp3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment