563acaf48cf475f4b125fd32374c6bb566049551,src/garage/torch/algos/vpg.py,VPG,process_samples,#VPG#Any#Any#,268

Before Change


                path["rewards"], self.discount)
        average_discounted_return = (np.mean(
            [path["returns"][0] for path in paths]))
        undiscounted_returns = [sum(path["rewards"]) for path in paths]
        average_return = np.mean(undiscounted_returns)

        self._episode_reward_mean.extend(undiscounted_returns)

After Change


                                            total_length=self.max_path_length,
                                            axis=0) for path in paths
        ])
        actions = torch.stack([
            loss_function_utils.pad_to_last(path["actions"],
                                            total_length=self.max_path_length,
                                            axis=0) for path in paths
        ])
        rewards = torch.stack([
            loss_function_utils.pad_to_last(path["rewards"],
                                            total_length=self.max_path_length)
            for path in paths
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: rlworkgroup/garage
Commit Name: 563acaf48cf475f4b125fd32374c6bb566049551
Time: 2019-11-06
Author: 43084978+yonghyuc@users.noreply.github.com
File Name: src/garage/torch/algos/vpg.py
Class Name: VPG
Method Name: process_samples


Project Name: uber/pyro
Commit Name: 91f31ae7eb26298d13f86ec146c7a4ced7af744d
Time: 2020-04-21
Author: fritzo@uber.com
File Name: examples/sir_hmc.py
Class Name:
Method Name: generate_data


Project Name: analysiscenter/batchflow
Commit Name: 260fe0d000a12e869206d8e36300a446a9891b35
Time: 2019-11-17
Author: nikita_007_94@mail.ru
File Name: batchflow/models/eager_torch/layers/core.py
Class Name: Dropout
Method Name: forward