1e9c3ee592be5e11dcce932a73009488d6f85474,ch17/lib/common.py,,iterate_batches,#,90

Before Change


                mb_rewards[e_idx, n] = r
                batch_dones[e_idx].append(done)
        // obtain values for the last observation
        obs_v = ptan.agent.default_states_preprocessor(obs, cuda)
        _, values_v = net(obs_v)
        values_last = values_v.squeeze().data.cpu().numpy()

        for e_idx, (rewards, dones, value) in enumerate(zip(mb_rewards, batch_dones, values_last)):

After Change


                mb_rewards[e_idx, n] = r
                batch_dones[e_idx].append(done)
        // obtain values for the last observation
        obs_v = ptan.agent.default_states_preprocessor(obs).to(device)
        _, values_v = net(obs_v)
        values_last = values_v.squeeze().data.cpu().numpy()

        for e_idx, (rewards, dones, value) in enumerate(zip(mb_rewards, batch_dones, values_last)):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 1e9c3ee592be5e11dcce932a73009488d6f85474
Time: 2018-04-29
Author: max.lapan@gmail.com
File Name: ch17/lib/common.py
Class Name:
Method Name: iterate_batches


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 656933c471e64ad697be749b98cea93a758ac5cb
Time: 2018-04-29
Author: max.lapan@gmail.com
File Name: ch16/02_cheetah_es.py
Class Name:
Method Name: evaluate


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 1e9c3ee592be5e11dcce932a73009488d6f85474
Time: 2018-04-29
Author: max.lapan@gmail.com
File Name: ch17/02_imag.py
Class Name:
Method Name: iterate_batches