Fix test failure in TestRBFKernelGrad
Kernel must also be cudaified to cudaify the lengthscales, o/w this
produces an error in kernel computation.
@@ -21,12 +21,14 @@ class TestRBFKernelGrad(unittest.TestCase):
]
)
+ kernel = RBFKernelGrad()
+
if cuda:
a = a.cuda()
b = b.cuda()
actual = actual.cuda()
+ kernel = kernel.cuda()
- kernel = RBFKernelGrad()
res = kernel(a, b).evaluate()
self.assertLess(torch.norm(res - actual), 1e-5)
