b5e848af46b4a6fc21e718803dbf3d7c72afd72a,ch08/lib/validation.py,,validation_run,#,9

Before Change


        while True:
            obs_v = Variable(torch.from_numpy(np.expand_dims(obs, 0)))
            if cuda:
                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:

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:
Italian Trulli
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: jindongwang/transferlearning
Commit Name: 376b01c2e338ec63e638f62a76d67f6a9323e47c
Time: 2019-08-14
Author: jindongwang@outlook.com
File Name: code/deep/DeepCoral/DeepCoral.py
Class Name:
Method Name:


Project Name: ncullen93/torchsample
Commit Name: f4ca9b361adb382423c753f7f864a5dd0e454964
Time: 2017-05-12
Author: ncullen.th@dartmouth.edu
File Name: torchsample/transforms/tensor_transforms.py
Class Name: ToCuda
Method Name: __call__