68ec284dd57ba00230c6c6199cbb71d53e0696fc,scripts/visualize.py,,,#,11
Before Change
obs = env.reset()
time.sleep(args.pause)
renderer = env.render()
if args.gif:
frames.append(numpy.moveaxis(env.render("rgb_array"), 2, 0))
action = agent.get_action(obs)
obs, reward, done, _ = env.step(action)
agent.analyze_feedback(reward, done)
if renderer.window is None:
if args.gif:
print("Saving gif... ", end="")
write_gif(numpy.array(frames), args.gif+".gif", fps=1/args.pause)
print("Done.")
break
After Change
done = True
for episode in range(args.episodes):
obs = env.reset()
while True:
time.sleep(args.pause)
env.render("human")
if args.gif:
frames.append(numpy.moveaxis(env.render("rgb_array"), 2, 0))
action = agent.get_action(obs)
obs, reward, done, _ = env.step(action)
agent.analyze_feedback(reward, done)
if done:
break
if args.gif:
print("Saving gif... ", end="")
write_gif(numpy.array(frames), args.gif+".gif", fps=1/args.pause)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: lcswillems/torch-rl
Commit Name: 68ec284dd57ba00230c6c6199cbb71d53e0696fc
Time: 2019-12-25
Author: maximechevalierb@gmail.com
File Name: scripts/visualize.py
Class Name:
Method Name:
Project Name: lengstrom/fast-style-transfer
Commit Name: 31bfc7c1ce9dac771dbd5e2edf2d5e789d8b1aaa
Time: 2016-12-23
Author: jonathan.e.m.bocker@gmail.com
File Name: evaluate.py
Class Name:
Method Name: from_pipe
Project Name: tristandeleu/pytorch-maml-rl
Commit Name: bef7dd92cbdd2c81a7d89786b9a76b011f1bc086
Time: 2018-06-19
Author: tristan.deleu@gmail.com
File Name: maml_rl/baseline.py
Class Name: LinearFeatureBaseline
Method Name: fit