Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pyro.contrib.examples.util.MNIST in tutorials #2784

Merged
merged 2 commits into from
Mar 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tutorial/source/vae.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"\n",
"import numpy as np\n",
"import torch\n",
"import torchvision.datasets as dset\n",
"from pyro.contrib.examples.util import MNIST\n",
"import torch.nn as nn\n",
"import torchvision.transforms as transforms\n",
"\n",
Expand Down Expand Up @@ -133,9 +133,9 @@
" root = './data'\n",
" download = True\n",
" trans = transforms.ToTensor()\n",
" train_set = dset.MNIST(root=root, train=True, transform=trans,\n",
" download=download)\n",
" test_set = dset.MNIST(root=root, train=False, transform=trans)\n",
" train_set = MNIST(root=root, train=True, transform=trans,\n",
" download=download)\n",
" test_set = MNIST(root=root, train=False, transform=trans)\n",
"\n",
" kwargs = {'num_workers': 1, 'pin_memory': use_cuda}\n",
" train_loader = torch.utils.data.DataLoader(dataset=train_set,\n",
Expand Down