@@ -9,12 +9,12 @@ K = [zeros(dims[1],dims[1]),zeros(dims[2],dims[2])]
9
9
l = 0.1
10
10
vl = l* ones (dims[1 ])
11
11
testfunction (k,A,B) = det (kernelmatrix (k,A,B))
12
- testfunction (k,A) = sum (kernelmatrix (k,A))
12
+ testfunction (k,A) = sum (kernelmatrix (k,A,obsdim = 2 ))
13
13
k = MaternKernel (vl)
14
14
KernelFunctions. kappa (k,3 )
15
15
testfunction (SqExponentialKernel (vl),A)
16
16
testfunction (MaternKernel (vl),A)
17
- @which kernelmatrix (MaternKernel (vl),A,B )
17
+ kernelmatrix (MaternKernel (vl),A)
18
18
# For debugging
19
19
@info " Running Zygote gradients"
20
20
Zygote. refresh ()
@@ -40,10 +40,10 @@ Zygote.gradient(x->kernelmatrix(MaternKernel(x,1.0),A)[1],l)
40
40
41
41
@info " Running ForwardDiff gradients"
42
42
# # ForwardDiff
43
- ForwardDiff. gradient (x-> testfunction (SqExponentialKernel (x),A,B),vl) # ✓
44
- ForwardDiff. gradient (x-> testfunction (MaternKernel (x),A,B),vl) # ✓
45
43
ForwardDiff. gradient (x-> testfunction (SqExponentialKernel (x),A),vl) # ✓
46
44
ForwardDiff. gradient (x-> testfunction (MaternKernel (x),A),vl) # ✓
45
+ ForwardDiff. gradient (x-> testfunction (SqExponentialKernel (x),A,B),vl) # ✓
46
+ ForwardDiff. gradient (x-> testfunction (MaternKernel (x),A,B),vl) # ✓
47
47
ForwardDiff. gradient (x-> testfunction (SqExponentialKernel (x[1 ]),A,B),[l])
48
48
ForwardDiff. gradient (x-> testfunction (MaternKernel (x[1 ]),A,B),[l])
49
49
ForwardDiff. gradient (x-> testfunction (SqExponentialKernel (x[1 ]),A),[l])
0 commit comments