Created
February 5, 2019 19:18
-
-
Save lsimmons2/5a3568b745e52024c2143909a3a208ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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