c81d6ec93f6350eabec347acc4420456dc07312b,tests/auto/keras/test_normalization.py,TestBatchNormalization,test_mode_0,#TestBatchNormalization#,22
Before Change
self.assertAlmostEqual(norm_m0.running_std.eval(), 0.5*np.arange(10).std(), places=2)
out_test = (norm_m0.get_output(train=False) - norm_m0.beta)/norm_m0.gamma
self.assertAlmostEqual(out_test.mean().eval(), -2.25 / (0.5*np.arange(10).std()),places=2)
self.assertAlmostEqual(out_test.std().eval(), 0.0, places=2)
norm_m0.input = self.input_3
out = (norm_m0.get_output(train=True) - norm_m0.beta)/norm_m0.gamma
After Change
self.assertRaises(Exception, normalization.BatchNormalization((10, 10), mode=3))
def test_mode_0(self):
model = Sequential()
norm_m0 = normalization.BatchNormalization((10,))
model.add(norm_m0)
model.compile(loss="mse", optimizer="sgd")
// centered on 5.0, variance 10.0
X = np.random.normal(loc=5.0, scale=10.0, size=(1000, 10))
model.fit(X, X, nb_epoch=5, verbose=0)
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 3
Instances
Project Name: keras-team/keras
Commit Name: c81d6ec93f6350eabec347acc4420456dc07312b
Time: 2015-08-08
Author: francois.chollet@gmail.com
File Name: tests/auto/keras/test_normalization.py
Class Name: TestBatchNormalization
Method Name: test_mode_0
Project Name: GPflow/GPflow
Commit Name: 126664f626f28f20e9f460c1cf5f6bf4643ce096
Time: 2017-10-30
Author: art.art.v@gmail.com
File Name: testing/test_data_object.py
Class Name: TestDataHolderSimple
Method Name: test_types
Project Name: keras-team/keras
Commit Name: 96f3404a574faa97b1895753fed7a602f853baa7
Time: 2015-12-08
Author: francois.chollet@gmail.com
File Name: tests/keras/layers/test_recurrent.py
Class Name:
Method Name: _runner
Project Name: GPflow/GPflow
Commit Name: 126664f626f28f20e9f460c1cf5f6bf4643ce096
Time: 2017-10-30
Author: art.art.v@gmail.com
File Name: testing/test_data_object.py
Class Name: TestDataHolderSimple
Method Name: test_same_shape
Project Name: GPflow/GPflow
Commit Name: 129f5beda91fb3832f058deacaaf7833027a9a26
Time: 2017-10-28
Author: art.art.v@gmail.com
File Name: testing/test_autoflow.py
Class Name: TestDataHolder
Method Name: test_add
Project Name: GPflow/GPflow
Commit Name: dec3dcf7b86168234e38e4f40059abecd3245c44
Time: 2017-10-29
Author: art.art.v@gmail.com
File Name: testing/test_profiling.py
Class Name: TestProfiling
Method Name: test_autoflow