Skip to content

Instantly share code, notes, and snippets.

@AurelianTactics
Created January 9, 2019 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AurelianTactics/4df4456e69e759c3f789eed136a2b399 to your computer and use it in GitHub Desktop.
Save AurelianTactics/4df4456e69e759c3f789eed136a2b399 to your computer and use it in GitHub Desktop.
TRFL Target Network Updating: Modify QNetwork
class QNetwork:
def __init__(self, name, learning_rate=0.01, state_size=4,
action_size=2, hidden_size=10, batch_size=20):
#same code here
#...
#method to get trainable variables for TRFL
def get_qnetwork_variables(self):
return [t for t in tf.trainable_variables() if t.name.startswith(self.name)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment