Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@
"Let's get started by importing our libraries and getting the dataset."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# The MNIST datasets are hosted on yann.lecun.com that has moved under CloudFlare protection\n",
"# Run this script to enable the datasets download\n",
"# Reference: https://github.com/pytorch/vision/issues/1938\n",
"from six.moves import urllib\n",
"opener = urllib.request.build_opener()\n",
"opener.addheaders = [('User-agent', 'Mozilla/5.0')]\n",
"urllib.request.install_opener(opener)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -38,9 +53,9 @@
"transform = transforms.ToTensor()\n",
"\n",
"# load the training and test datasets\n",
"train_data = datasets.MNIST(root='data', train=True,\n",
"train_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=True,\n",
" download=True, transform=transform)\n",
"test_data = datasets.MNIST(root='data', train=False,\n",
"test_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=False,\n",
" download=True, transform=transform)"
]
},
Expand Down Expand Up @@ -282,7 +297,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -296,7 +311,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@
"Let's get started by importing our libraries and getting the dataset."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# The MNIST datasets are hosted on yann.lecun.com that has moved under CloudFlare protection\n",
"# Run this script to enable the datasets download\n",
"# Reference: https://github.com/pytorch/vision/issues/1938\n",
"from six.moves import urllib\n",
"opener = urllib.request.build_opener()\n",
"opener.addheaders = [('User-agent', 'Mozilla/5.0')]\n",
"urllib.request.install_opener(opener)"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand All @@ -38,9 +53,9 @@
"transform = transforms.ToTensor()\n",
"\n",
"# load the training and test datasets\n",
"train_data = datasets.MNIST(root='data', train=True,\n",
"train_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=True,\n",
" download=True, transform=transform)\n",
"test_data = datasets.MNIST(root='data', train=False,\n",
"test_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=False,\n",
" download=True, transform=transform)"
]
},
Expand Down Expand Up @@ -373,7 +388,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -387,7 +402,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
23 changes: 19 additions & 4 deletions autoencoder/convolutional-autoencoder/Upsampling_Solution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@
"Let's get started by importing our libraries and getting the dataset."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# The MNIST datasets are hosted on yann.lecun.com that has moved under CloudFlare protection\n",
"# Run this script to enable the datasets download\n",
"# Reference: https://github.com/pytorch/vision/issues/1938\n",
"from six.moves import urllib\n",
"opener = urllib.request.build_opener()\n",
"opener.addheaders = [('User-agent', 'Mozilla/5.0')]\n",
"urllib.request.install_opener(opener)"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand All @@ -38,9 +53,9 @@
"transform = transforms.ToTensor()\n",
"\n",
"# load the training and test datasets\n",
"train_data = datasets.MNIST(root='data', train=True,\n",
"train_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=True,\n",
" download=True, transform=transform)\n",
"test_data = datasets.MNIST(root='data', train=False,\n",
"test_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=False,\n",
" download=True, transform=transform)"
]
},
Expand Down Expand Up @@ -365,7 +380,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -379,7 +394,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
"Let's get started by importing our libraries and getting the dataset."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# The MNIST datasets are hosted on yann.lecun.com that has moved under CloudFlare protection\n",
"# Run this script to enable the datasets download\n",
"# Reference: https://github.com/pytorch/vision/issues/1938\n",
"from six.moves import urllib\n",
"opener = urllib.request.build_opener()\n",
"opener.addheaders = [('User-agent', 'Mozilla/5.0')]\n",
"urllib.request.install_opener(opener)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -30,9 +45,9 @@
"transform = transforms.ToTensor()\n",
"\n",
"# load the training and test datasets\n",
"train_data = datasets.MNIST(root='data', train=True,\n",
"train_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=True,\n",
" download=True, transform=transform)\n",
"test_data = datasets.MNIST(root='data', train=False,\n",
"test_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=False,\n",
" download=True, transform=transform)\n",
"\n",
"# Create training and test dataloaders\n",
Expand Down Expand Up @@ -273,7 +288,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -287,7 +302,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
"Let's get started by importing our libraries and getting the dataset."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# The MNIST datasets are hosted on yann.lecun.com that has moved under CloudFlare protection\n",
"# Run this script to enable the datasets download\n",
"# Reference: https://github.com/pytorch/vision/issues/1938\n",
"from six.moves import urllib\n",
"opener = urllib.request.build_opener()\n",
"opener.addheaders = [('User-agent', 'Mozilla/5.0')]\n",
"urllib.request.install_opener(opener)"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand All @@ -28,9 +43,9 @@
"transform = transforms.ToTensor()\n",
"\n",
"# load the training and test datasets\n",
"train_data = datasets.MNIST(root='data', train=True,\n",
"train_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=True,\n",
" download=True, transform=transform)\n",
"test_data = datasets.MNIST(root='data', train=False,\n",
"test_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=False,\n",
" download=True, transform=transform)\n",
"\n",
"# Create training and test dataloaders\n",
Expand Down Expand Up @@ -369,7 +384,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -383,7 +398,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@
"In this notebook, we'll be build a simple network architecture for the encoder and decoder. Let's get started by importing our libraries and getting the dataset."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# The MNIST datasets are hosted on yann.lecun.com that has moved under CloudFlare protection\n",
"# Run this script to enable the datasets download\n",
"# Reference: https://github.com/pytorch/vision/issues/1938\n",
"from six.moves import urllib\n",
"opener = urllib.request.build_opener()\n",
"opener.addheaders = [('User-agent', 'Mozilla/5.0')]\n",
"urllib.request.install_opener(opener)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -36,9 +51,9 @@
"transform = transforms.ToTensor()\n",
"\n",
"# load the training and test datasets\n",
"train_data = datasets.MNIST(root='data', train=True,\n",
"train_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=True,\n",
" download=True, transform=transform)\n",
"test_data = datasets.MNIST(root='data', train=False,\n",
"test_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=False,\n",
" download=True, transform=transform)"
]
},
Expand Down Expand Up @@ -267,9 +282,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"metadata": {},
"source": [
"## Up Next\n",
"\n",
Expand All @@ -279,7 +292,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -293,7 +306,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@
"In this notebook, we'll be build a simple network architecture for the encoder and decoder. Let's get started by importing our libraries and getting the dataset."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# The MNIST datasets are hosted on yann.lecun.com that has moved under CloudFlare protection\n",
"# Run this script to enable the datasets download\n",
"# Reference: https://github.com/pytorch/vision/issues/1938\n",
"from six.moves import urllib\n",
"opener = urllib.request.build_opener()\n",
"opener.addheaders = [('User-agent', 'Mozilla/5.0')]\n",
"urllib.request.install_opener(opener)"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand All @@ -36,9 +51,9 @@
"transform = transforms.ToTensor()\n",
"\n",
"# load the training and test datasets\n",
"train_data = datasets.MNIST(root='data', train=True,\n",
"train_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=True,\n",
" download=True, transform=transform)\n",
"test_data = datasets.MNIST(root='data', train=False,\n",
"test_data = datasets.MNIST(root='~/.pytorch/MNIST_data/', train=False,\n",
" download=True, transform=transform)"
]
},
Expand Down Expand Up @@ -336,9 +351,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"metadata": {},
"source": [
"## Up Next\n",
"\n",
Expand All @@ -348,7 +361,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -362,7 +375,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
Loading