54691f9be052e5564ca0e5c6a503e641ea3142e1,keras/layers/normalization.py,BatchNormalization,output,#BatchNormalization#Any#,23

Before Change



    def output(self, train):
        X = self.get_input(train)
        X_normed = (X - X.mean(keepdims=True)) / (X.std(keepdims=True) + self.epsilon)
        out = self.gamma * X_normed + self.beta
        return out

After Change


        X = self.get_input(train)

        if self.mode == 0:
            m = X.mean(axis=0)
            // manual computation of std to prevent NaNs
            std = T.mean((X-m)**2 + self.epsilon, axis=0) ** 0.5
            X_normed = (X - m) / (std + self.epsilon)

        elif self.mode == 1:
            m = X.mean(axis=-1, keepdims=True)
            std = X.std(axis=-1, keepdims=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: keras-team/keras
Commit Name: 54691f9be052e5564ca0e5c6a503e641ea3142e1
Time: 2015-04-27
Author: francois.chollet@gmail.com
File Name: keras/layers/normalization.py
Class Name: BatchNormalization
Method Name: output


Project Name: catalyst-team/catalyst
Commit Name: d3f12d1622f736e649fcec853044b05fe68e05ba
Time: 2019-07-07
Author: scitator@gmail.com
File Name: catalyst/rl/onpolicy/algorithms/ppo.py
Class Name: PPO
Method Name: postprocess_buffer


Project Name: NifTK/NiftyNet
Commit Name: 03e8525394683bb5da7668330cd910c87c7d4501
Time: 2017-04-03
Author: l.fidon@ucl.ac.uk
File Name: data_augmentation.py
Class Name:
Method Name: rand_intensity_normalisation