Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created December 23, 2019 11:12
Show Gist options
  • Save NMZivkovic/1ddde4f20f9d4cbc8a25a1c4acc1933f to your computer and use it in GitHub Desktop.
Save NMZivkovic/1ddde4f20f9d4cbc8a25a1c4acc1933f to your computer and use it in GitHub Desktop.
counter = tf.Variable(0)
agent = DqnAgent(
train_env.time_step_spec(),
train_env.action_spec(),
q_network = q_network,
optimizer = tf.compat.v1.train.AdamOptimizer(learning_rate=1e-3),
td_errors_loss_fn = common.element_wise_squared_loss,
train_step_counter = counter)
agent.initialize()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment