19ad2d60a7022bb5125855c029f27d86aaa46d64,rl_coach/filters/reward/reward_normalization_filter.py,RewardNormalizationFilter,filter,#RewardNormalizationFilter#Any#Any#,65

Before Change



        reward = (reward - self.running_rewards_stats.mean) / \
                      (self.running_rewards_stats.std + 1e-15)
        reward = np.clip(reward, self.clip_min, self.clip_max)

        return reward

    def get_filtered_reward_space(self, input_reward_space: RewardSpace) -> RewardSpace:

After Change


    def filter(self, reward: RewardType, update_internal_state: bool=True) -> RewardType:
        if update_internal_state:
            if not isinstance(reward, np.ndarray) or len(reward.shape) < 2:
                reward = np.array([[reward]])
            self.running_rewards_stats.push(reward)

        return self.running_rewards_stats.normalize(reward).squeeze()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: NervanaSystems/coach
Commit Name: 19ad2d60a7022bb5125855c029f27d86aaa46d64
Time: 2019-07-14
Author: gal.leibovich@intel.com
File Name: rl_coach/filters/reward/reward_normalization_filter.py
Class Name: RewardNormalizationFilter
Method Name: filter


Project Name: deeptools/HiCExplorer
Commit Name: 5dae546485b7e066712c0c5f7c8c13cbd582c37f
Time: 2018-10-19
Author: wolffj@informatik.uni-freiburg.de
File Name: hicexplorer/chicPlotViewpoint.py
Class Name:
Method Name: main


Project Name: Esri/raster-functions
Commit Name: e698c1f1bbab1691152743a4516cf574c406e391
Time: 2015-02-11
Author: jwasilkowski@esri.com
File Name: functions/LinearSpectralUnmixing.py
Class Name: LinearSpectralUnmixing
Method Name: updatePixels


Project Name: hyperspy/hyperspy
Commit Name: f6528ed2082eb63b23f63a908d524cb64c0dcc8a
Time: 2017-05-25
Author: frandelapena@gmail.com
File Name: hyperspy/drawing/image.py
Class Name: ImagePlot
Method Name: create_figure