19ad2d60a7022bb5125855c029f27d86aaa46d64,rl_coach/filters/reward/reward_normalization_filter.py,RewardNormalizationFilter,filter,#RewardNormalizationFilter#Any#Any#,65
Before Change
if update_internal_state:
self.running_rewards_stats.push(reward)
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:
return input_reward_space
After Change
reward = np.array([[reward]])
self.running_rewards_stats.push(reward)
return self.running_rewards_stats.normalize(reward).squeeze()
def get_filtered_reward_space(self, input_reward_space: RewardSpace) -> RewardSpace:
self.running_rewards_stats.set_params(shape=(1,), clip_values=(self.clip_min, self.clip_max))
return input_reward_space
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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: raghakot/keras-vis
Commit Name: f9368bbcdcb336fb3b66d487195fe7df15e29da8
Time: 2016-12-19
Author: ragha@outlook.com
File Name: regularizers.py
Class Name: LPNorm
Method Name: build_loss
Project Name: raghakot/keras-vis
Commit Name: f9368bbcdcb336fb3b66d487195fe7df15e29da8
Time: 2016-12-19
Author: ragha@outlook.com
File Name: regularizers.py
Class Name: TotalVariation
Method Name: build_loss