Skip to content

Commit 73a98a5

Browse files
committed
Fix failing example
1 parent 4d9909b commit 73a98a5

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

examples/045_GPLVM/3PhData.tar.gz

128 KB
Binary file not shown.

examples/045_GPLVM/Gaussian_Process_Latent_Variable_Models_with_Stochastic_Variational_Inference.ipynb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,11 @@
3333
"source": [
3434
"# Standard imports\n",
3535
"import matplotlib.pylab as plt\n",
36-
"import torch \n",
36+
"import torch\n",
3737
"import os\n",
3838
"import numpy as np\n",
3939
"from pathlib import Path\n",
4040
"\n",
41-
"# If you are running this notebook interactively\n",
42-
"wdir = Path(os.path.abspath('')).parent.parent\n",
43-
"os.chdir(wdir)\n",
44-
"\n",
4541
"# gpytorch imports\n",
4642
"from gpytorch.mlls import VariationalELBO\n",
4743
"from gpytorch.priors import NormalPrior\n",
@@ -74,13 +70,11 @@
7470
"import urllib.request\n",
7571
"import tarfile\n",
7672
"\n",
77-
"url = \"http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/resources/3PhData.tar.gz\"\n",
78-
"urllib.request.urlretrieve(url, '3PhData.tar.gz')\n",
7973
"with tarfile.open('3PhData.tar.gz', 'r') as f:\n",
8074
" f.extract('DataTrn.txt')\n",
8175
" f.extract('DataTrnLbls.txt')\n",
8276
"\n",
83-
"Y = torch.Tensor(np.loadtxt(fname='DataTrn.txt')) \n",
77+
"Y = torch.Tensor(np.loadtxt(fname='DataTrn.txt'))\n",
8478
"labels = torch.Tensor(np.loadtxt(fname='DataTrnLbls.txt'))\n",
8579
"labels = (labels @ np.diag([1, 2, 3])).sum(axis=1)"
8680
]

0 commit comments

Comments
 (0)