49a385eae93032125a6718433b3ca1753aee3b1e,testing/test_method_equivalence.py,TestEquivalence,test_all,#TestEquivalence#,87

Before Change


    def test_all(self):
        with self.test_context():
            likelihoods = np.array([
                -m._objective(m.get_free_state())[0].squeeze()
                for m in self.models])
            self.assertTrue(np.allclose(likelihoods, likelihoods[0], 1e-6))
            variances, lengthscales = [], []

After Change


        with self.test_context():
            likelihoods = []
            for m in self.models:
                m.compile()
                opt = gpflow.train.ScipyOptimizer()
                opt.minimize(m, maxiter=300)
                neg_obj = tf.negative(m.objective)
                likelihoods.append(m.session.run(neg_obj).squeeze())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: GPflow/GPflow
Commit Name: 49a385eae93032125a6718433b3ca1753aee3b1e
Time: 2017-11-02
Author: art.art.v@gmail.com
File Name: testing/test_method_equivalence.py
Class Name: TestEquivalence
Method Name: test_all


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_eachtime


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_profile