def test_asym(self):
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")
Z = tf.placeholder("float64")
X_data = self.rng.randn(10, 1)
Z_data = self.rng.randn(12, 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, Z: Z_data})
self.assertTrue(np.allclose(self.rbf._K + self.lin._K, self.k._K))
class TestWhite(GPflowTestCase):