Created
August 10, 2018 03:58
-
-
Save rayheberer/a8975ad8a6d579b07f64e0c3d1129311 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class DQNMoveOnly(base_agent.BaseAgent): | |
# ... | |
# ... | |
# ... | |
# ... | |
def _update_target_network(self): | |
online_vars = tf.get_collection( | |
tf.GraphKeys.TRAINABLE_VARIABLES, 'DQN') | |
target_vars = tf.get_collection( | |
tf.GraphKeys.TRAINABLE_VARIABLES, 'DQNTarget') | |
update_op = [] | |
for online_var, target_var in zip(online_vars, target_vars): | |
update_op.append(target_var.assign(online_var)) | |
self.sess.run(update_op) | |
# ... | |
# ... | |
# ... | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment