mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-12 05:22:38 +02:00
new gradcheck for more stability in mrd_tests
This commit is contained in:
parent
8af4ddabf1
commit
2b2edae083
1 changed files with 2 additions and 2 deletions
|
|
@ -14,16 +14,16 @@ class MRDTests(unittest.TestCase):
|
|||
|
||||
def test_gradients(self):
|
||||
num_m = 3
|
||||
N, M, Q, D = 20, 8, 5, 50
|
||||
N, M, Q, D = 20, 8, 6, 20
|
||||
X = np.random.rand(N, Q)
|
||||
|
||||
k = GPy.kern.linear(Q) + GPy.kern.bias(Q) + GPy.kern.white(Q)
|
||||
K = k.K(X)
|
||||
|
||||
Ylist = [np.random.multivariate_normal(np.zeros(N), K, D).T for _ in range(num_m)]
|
||||
|
||||
m = GPy.models.MRD(*Ylist, Q=Q, kernel=k, M=M)
|
||||
m.ensure_default_constraints()
|
||||
m.randomize()
|
||||
|
||||
self.assertTrue(m.checkgrad())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue