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)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
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: f4beaac559e00a3676d942dc7e8fea69efc01cfe
Time: 2020-11-30
Author: raveforlive@gmail.com
File Name: catalyst/metrics/avg_precision.py
Class Name:
Method Name: mean_avg_precision
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
Project Name: ray-project/ray
Commit Name: d9f1874e3489edc915228dcfdae64d5294034464
Time: 2020-10-27
Author: sven@anyscale.io
File Name: rllib/agents/pg/tests/test_pg.py
Class Name: TestPG
Method Name: test_pg_loss_functions