Skip to content

Commit ba238fb

Browse files
committed
Add setting to turn off diagonal correction for InducingPointKernel.
1 parent 8125eaa commit ba238fb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/kernels/test_inducing_point_kernel.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ def test_kernel_output(self):
5050
self.assertTrue(ps_mock.called)
5151

5252
# Check whether changing diagonal correction makes a difference (ensuring that cache is cleared)
53-
model.train(); model.eval();
53+
model.train()
54+
model.eval()
5455
with gpytorch.settings.sgpr_diagonal_correction(True), torch.no_grad():
5556
output_mean_correct = model(test_x).mean
56-
model.train(); model.eval();
57+
model.train()
58+
model.eval()
5759
with gpytorch.settings.sgpr_diagonal_correction(False), torch.no_grad():
5860
output_mean_no_correct = model(test_x).mean
5961
self.assertNotAlmostEqual(output_mean_correct.sum().item(), output_mean_no_correct.sum().item())

0 commit comments

Comments
 (0)