mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-12 13:32:39 +02:00
added cholesy backprop test
This commit is contained in:
parent
a772a6120a
commit
edc868c213
1 changed files with 8 additions and 0 deletions
|
|
@ -49,6 +49,14 @@ class test_stationary(np.testing.TestCase):
|
||||||
g2 = self.k._lengthscale_grads_cython(self.dKxz, self.X, self.Z)
|
g2 = self.k._lengthscale_grads_cython(self.dKxz, self.X, self.Z)
|
||||||
np.testing.assert_allclose(g1, g2)
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue