0ede18f7755da45e8aafc0844e455a53645d06e8,testing/test_likelihoods.py,TestQuadrature,test_pred_density,#TestQuadrature#,76

Before Change


        for l in liks:
            x_data = l.get_free_state()
            //make parameters if needed
            if len(x_data):
                x = tf.placeholder("float64")
                l.make_tf_array(x)
            //"build" the functions
            with l.tf_mode():
                F1 = l.predict_density(self.Fmu, self.Fvar, self.Y)
                F2 = GPflow.likelihoods.Likelihood.predict_density(l, self.Fmu, self.Fvar, self.Y)
            //compile and run the functions:

After Change


                F1 = l.predict_density(self.Fmu, self.Fvar, self.Y)
                F2 = GPflow.likelihoods.Likelihood.predict_density(l, self.Fmu, self.Fvar, self.Y)
            //compile and run the functions:
            F1 = tf.Session().run(F1, feed_dict={x: x_data})
            F2 = tf.Session().run(F2, feed_dict={x: x_data})
            self.failUnless(np.allclose(F1, F2, 1e-6, 1e-6))

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: GPflow/GPflow
Commit Name: 0ede18f7755da45e8aafc0844e455a53645d06e8
Time: 2016-01-17
Author: james.hensman@gmail.com
File Name: testing/test_likelihoods.py
Class Name: TestQuadrature
Method Name: test_pred_density


Project Name: GPflow/GPflow
Commit Name: 0ede18f7755da45e8aafc0844e455a53645d06e8
Time: 2016-01-17
Author: james.hensman@gmail.com
File Name: testing/test_likelihoods.py
Class Name: TestQuadrature
Method Name: test_var_exp


Project Name: tensorflow/datasets
Commit Name: 1e84cededb34347e5fd3a169b824020606f36d6c
Time: 2019-01-28
Author: epot@google.com
File Name: tensorflow_datasets/core/dataset_utils.py
Class Name:
Method Name: dataset_as_numpy