We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d98ceab commit c118306Copy full SHA for c118306
test/examples/test_keops_gp_regression.py
@@ -16,7 +16,7 @@
16
17
18
# Simple training data: let's try to learn a sine function
19
-train_x = torch.randn(1000, 2)
+train_x = torch.randn(300, 2)
20
train_y = torch.sin(train_x[..., 0] * (2 * pi) + train_x[..., 1])
21
train_y = train_y + torch.randn_like(train_y).mul(0.001)
22
@@ -52,11 +52,11 @@ def test_keops_gp_mean_abs_error(self):
52
# Optimize the model
53
gp_model.train()
54
likelihood.train()
55
- optimizer = optim.Adam(list(gp_model.parameters()), lr=0.01)
+ optimizer = optim.Adam(list(gp_model.parameters()), lr=0.1)
56
optimizer.n_iter = 0
57
58
with gpytorch.settings.max_cholesky_size(0): # Ensure that we're using KeOps
59
- for i in range(300):
+ for i in range(25):
60
optimizer.zero_grad()
61
output = gp_model(train_x)
62
loss = -mll(output, train_y)
0 commit comments