2f1f42eeb68c64ff991c0ae2e8253a9305e90f74,autokeras/hypermodel/processor.py,Normalize,fit,#Normalize#Any#Any#,82

Before Change


        self.mean = np.mean(data,
                            axis=axis,
                            keepdims=True).flatten()
        self.std = np.std(data,
                          axis=axis,
                          keepdims=True).flatten()

    def transform(self, hp, data):
         Transform the test data, perform normalization.

After Change



        total_sum_square = data.reduce(np.float64(0), sum_up_square) / num_instance
        square_mean = tf.reduce_mean(total_sum_square, axis=axis)
        self.std = tf.sqrt(square_mean - tf.square(self.mean))

    def transform(self, hp, data):
         Transform the test data, perform normalization.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: keras-team/autokeras
Commit Name: 2f1f42eeb68c64ff991c0ae2e8253a9305e90f74
Time: 2019-07-04
Author: jhfjhfj1@gmail.com
File Name: autokeras/hypermodel/processor.py
Class Name: Normalize
Method Name: fit


Project Name: GPflow/GPflow
Commit Name: 956ac38fd58a1ef65c18dffc06a22d2e628e3a16
Time: 2016-01-18
Author: james.hensman@gmail.com
File Name: testing/test_conditionals.py
Class Name: WhitenTestGaussian
Method Name: test_whiten