From edc868c213611172310a1b1bf2d7333a3e776a37 Mon Sep 17 00:00:00 2001 From: James Hensman Date: Wed, 29 Apr 2015 14:37:51 +0100 Subject: [PATCH] added cholesy backprop test --- GPy/testing/cython_tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GPy/testing/cython_tests.py b/GPy/testing/cython_tests.py index 425a1ca9..bbc9847d 100644 --- a/GPy/testing/cython_tests.py +++ b/GPy/testing/cython_tests.py @@ -49,6 +49,14 @@ class test_stationary(np.testing.TestCase): g2 = self.k._lengthscale_grads_cython(self.dKxz, self.X, self.Z) np.testing.assert_allclose(g1, g2) +class test_choleskies_backprop(np.testing.TestCase): + def setUp(self): + self.dL, self.L = np.random.randn(2, 100, 100) + def test(self): + r1 = GPy.util.choleskies._backprop_gradient_pure(self.dL, self.L) + r2 = GPy.util.choleskies.choleskies_cython.backprop_gradient(self.dL, self.L) + np.testing.assert_allclose(r1, r2) +