Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lsimmons2/5a3568b745e52024c2143909a3a208ee to your computer and use it in GitHub Desktop.
Save lsimmons2/5a3568b745e52024c2143909a3a208ee to your computer and use it in GitHub Desktop.
def update_target_network(self):
q_network_theta = self.online_network.get_weights()
target_network_theta = self.target_network.get_weights()
counter = 0
for q_weight, target_weight in zip(q_network_theta,target_network_theta):
target_weight = target_weight * (1-TAU) + q_weight * TAU
target_network_theta[counter] = target_weight
counter += 1
self.target_network.set_weights(target_network_theta)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment