cc5e7d00a6696a8cf6e40686455e7e034fbf26ff,testing/test_kerns.py,TestAdd,test_sym,#TestAdd#,295

Before Change


        with self.test_context() as sess:
            x_free = tf.placeholder("float64")
            [k.make_tf_array(x_free) for k in (self.rbf, self.lin, self.k)]
            X = tf.placeholder("float64")
            X_data = self.rng.randn(10, 1)
            for k in [self.rbf, self.lin, self.k]:
                with k.tf_mode():
                    k._K = sess.run(
                        k.K(X),
                        feed_dict={x_free: k.get_free_state(), X: X_data})
            self.assertTrue(np.allclose(self.rbf._K + self.lin._K, self.k._K))

    def test_asym(self):
        with self.test_context() as sess:

After Change


            for k in self.kernels:
                k.compile()
                res.append(k.session.run(k.K(X), feed_dict={X: X_data}))
            self.assertTrue(np.allclose(res[0] + res[1], res[2]))

    def test_asym(self):
        with self.test_context():
            X = tf.placeholder(tf.float64)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: GPflow/GPflow
Commit Name: cc5e7d00a6696a8cf6e40686455e7e034fbf26ff
Time: 2017-09-28
Author: art.art.v@gmail.com
File Name: testing/test_kerns.py
Class Name: TestAdd
Method Name: test_sym


Project Name: tensorlayer/tensorlayer
Commit Name: 910e1e544793c0ca9859a5a4f1c0171104166dc3
Time: 2019-03-10
Author: jingqing.zhang15@imperial.ac.uk
File Name: tests/layers/test_layers_core_basedense_dropout.py
Class Name: Layer_Core_Test
Method Name: test_modellayer


Project Name: GPflow/GPflow
Commit Name: cc5e7d00a6696a8cf6e40686455e7e034fbf26ff
Time: 2017-09-28
Author: art.art.v@gmail.com
File Name: testing/test_kerns.py
Class Name: TestAdd
Method Name: test_asym