87232aa39c159f04a501ad268012da45a1ff537c,torch_rl/torch_rl/algos/base.py,BaseAlgo,collect_experiences,#BaseAlgo#,68

Before Change



        log = {
            "return_per_episode": self.log_return.cpu().numpy(),
            "reshaped_return_per_episode": self.log_reshaped_return.cpu().numpy(),
            "num_frames_per_episode": self.log_num_frames.cpu().numpy(),
            "num_frames": self.num_frames
        }

After Change


            self.log_episode_num_frames += torch.ones(self.num_procs, device=self.device)

            for i, done_ in enumerate(done):
                if done_:
                    self.log_done_counter += 1
                    self.log_return.append(self.log_episode_return[i].item())
                    self.log_reshaped_return.append(self.log_episode_reshaped_return[i].item())
                    self.log_num_frames.append(self.log_episode_num_frames[i].item())

            self.log_episode_return *= self.mask
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: lcswillems/torch-rl
Commit Name: 87232aa39c159f04a501ad268012da45a1ff537c
Time: 2018-05-14
Author: lcswillems@gmail.com
File Name: torch_rl/torch_rl/algos/base.py
Class Name: BaseAlgo
Method Name: collect_experiences


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: e70bdb2d089ae283781c45b8d97963823a984baa
Time: 2017-12-15
Author: max.lapan@gmail.com
File Name: ch10/00_pong_pg.py
Class Name:
Method Name:


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: e21ef336207b0f9ae378c77430d298945827830a
Time: 2019-02-12
Author: M.N.Tran@ibm.com
File Name: art/classifiers/pytorch.py
Class Name: PyTorchClassifier
Method Name: get_activations