1a89404a84393211c7b370077fafe536a8f44762,ch17/lib/common.py,,iterate_batches,#Any#Any#Any#,64

Before Change


        _, values_v = net(obs_v)
        values_last = values_v.squeeze().data.cpu().numpy()
        // prepare before rollouts calculation
        mb_dones = np.roll(mb_dones, -1, axis=1)
        mb_dones[:, -1] = cur_dones

        for e_idx, (rewards, dones, value) in enumerate(zip(mb_rewards, mb_dones, values_last)):
            rewards = rewards.tolist()

After Change


    mb_actions = np.zeros((NUM_ENVS, REWARD_STEPS), dtype=np.int32)

    while True:
        batch_dones = [[dones[-1]] for dones in batch_dones]
        done_rewards = []
        done_steps = []
        for n in range(REWARD_STEPS):
            obs_v = ptan.agent.default_states_preprocessor(obs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


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


Project Name: dpressel/mead-baseline
Commit Name: 1b8ca89144d2eb858ef0763a6f9b272619b7ee59
Time: 2020-10-28
Author: dpressel@gmail.com
File Name: api-examples/transformer_utils.py
Class Name: NextTurnPredictionFileLoader
Method Name: process_line


Project Name: Calamari-OCR/calamari
Commit Name: 1b305c86dc2ff6b3461c42f4428460b66a8bff8b
Time: 2020-01-31
Author: wick.chr.info@gmail.com
File Name: calamari_ocr/ocr/backends/tensorflow_backend/tensorflow_model.py
Class Name: TensorflowModel
Method Name: predict_dataset