Skip to content
Snippets Groups Projects
Commit 7824ccd4 authored by Steve Schmerler's avatar Steve Schmerler
Browse files

03_one_dim_SVI: switch on Z learning, use other batch size

parent 6a4e94de
Branches
No related tags found
1 merge request!2Update GP slides and notebooks
...@@ -138,7 +138,7 @@ class ApproxGPModel(gpytorch.models.ApproximateGP): ...@@ -138,7 +138,7 @@ class ApproxGPModel(gpytorch.models.ApproximateGP):
self, self,
Z, Z,
variational_distribution, variational_distribution,
learn_inducing_locations=False, learn_inducing_locations=True,
) )
super().__init__(variational_strategy) super().__init__(variational_strategy)
self.mean_module = gpytorch.means.ConstantMean() self.mean_module = gpytorch.means.ConstantMean()
...@@ -223,7 +223,9 @@ loss_func = gpytorch.mlls.VariationalELBO( ...@@ -223,7 +223,9 @@ loss_func = gpytorch.mlls.VariationalELBO(
likelihood, model, num_data=X_train.shape[0] likelihood, model, num_data=X_train.shape[0]
) )
train_dl = DataLoader(TensorDataset(X_train, y_train), batch_size=len(X_train)//2, shuffle=True) train_dl = DataLoader(
TensorDataset(X_train, y_train), batch_size=128, shuffle=True
)
n_iter = 200 n_iter = 200
history = defaultdict(list) history = defaultdict(list)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment