Skip to content

Instantly share code, notes, and snippets.

@piEsposito
Last active January 21, 2020 17:20
Show Gist options
  • Save piEsposito/defd1493737bb003f6eec68664723afc to your computer and use it in GitHub Desktop.
Save piEsposito/defd1493737bb003f6eec68664723afc to your computer and use it in GitHub Desktop.
#here we set the global variables
GAMMA = .95
EPISODES = 5000
learning_rate = 0.01
#our net and frame-stacker
stacker = FrameStacker()
policy_net = PolicyNetwork(lr=learning_rate).to(device)
#some lists to write the values
num_steps = []
avg_numsteps = []
all_rewards = []
#we leverage this cell to write our graph to TensorBoard.
writer.add_graph(policy_net, stacker.stack(torch.zeros(84, 84)).unsqueeze(0).to(device))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment