b5e848af46b4a6fc21e718803dbf3d7c72afd72a,ch08/lib/validation.py,,validation_run,#,9
Before Change
obs_v = obs_v.cuda()
out_v = net(obs_v)
action_idx = out_v.max(dim=1)[1].data.cpu().numpy()[0]
if np.random.random() < epsilon:
action_idx = env.action_space.sample()
action = environ.Actions(action_idx)
After Change
episode_steps = 0
while True:
obs_v = torch.tensor([obs]).to(device)
out_v = net(obs_v)
action_idx = out_v.max(dim=1)[1].item()
if np.random.random() < epsilon:

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: b5e848af46b4a6fc21e718803dbf3d7c72afd72a
Time: 2018-04-27
Author: max.lapan@gmail.com
File Name: ch08/lib/validation.py
Class Name:
Method Name: validation_run
Project Name: ClementPinard/FlowNetPytorch
Commit Name: c6a079c70368b41873f3288b05b74d38f74b6680
Time: 2018-03-30
Author: clement.pinard@parrot.com
File Name: run_inference.py
Class Name:
Method Name: main
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: b5e848af46b4a6fc21e718803dbf3d7c72afd72a
Time: 2018-04-27
Author: max.lapan@gmail.com
File Name: ch08/run_model.py
Class Name:
Method Name: