Created
January 9, 2019 18:15
-
-
Save AurelianTactics/8bade5bf7e11b0aa621141465d7deba7 to your computer and use it in GitHub Desktop.
TRFL Target Network Updating: periodic_target_update.py
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
#in graph | |
target_network_update_ops = trfl.periodic_target_update(targetQN.get_qnetwork_variables(),mainQN.get_qnetwork_variables(), | |
update_period=2000,tau=1.0) | |
#in session | |
with tf.Session() as sess: | |
#.... | |
for ep in range(1, train_episodes): | |
#... | |
#update target q network | |
sess.run(target_network_update_ops) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment