Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
f9df9323
Commit
f9df9323
authored
Oct 31, 2017
by
Tzu-Wei Huang
Committed by
Soumith Chintala
Oct 31, 2017
Browse files
Fix dataset url (#314)
parent
7be960f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
torchvision/datasets/cifar.py
torchvision/datasets/cifar.py
+2
-2
torchvision/datasets/utils.py
torchvision/datasets/utils.py
+9
-2
No files found.
torchvision/datasets/cifar.py
View file @
f9df9323
...
...
@@ -32,7 +32,7 @@ class CIFAR10(data.Dataset):
"""
base_folder
=
'cifar-10-batches-py'
url
=
"http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz"
url
=
"http
s
://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz"
filename
=
"cifar-10-python.tar.gz"
tgz_md5
=
'c58f30108f718f92721af3b95e74349a'
train_list
=
[
...
...
@@ -162,7 +162,7 @@ class CIFAR10(data.Dataset):
class
CIFAR100
(
CIFAR10
):
base_folder
=
'cifar-100-python'
url
=
"http://www.cs.toronto.edu/~kriz/cifar-100-python.tar.gz"
url
=
"http
s
://www.cs.toronto.edu/~kriz/cifar-100-python.tar.gz"
filename
=
"cifar-100-python.tar.gz"
tgz_md5
=
'eb9058c3a382ffc7106e4002c42a8d85'
train_list
=
[
...
...
torchvision/datasets/utils.py
View file @
f9df9323
...
...
@@ -36,5 +36,12 @@ def download_url(url, root, filename, md5):
if
os
.
path
.
isfile
(
fpath
)
and
check_integrity
(
fpath
,
md5
):
print
(
'Using downloaded and verified file: '
+
fpath
)
else
:
print
(
'Downloading '
+
url
+
' to '
+
fpath
)
urllib
.
request
.
urlretrieve
(
url
,
fpath
)
try
:
print
(
'Downloading '
+
url
+
' to '
+
fpath
)
urllib
.
request
.
urlretrieve
(
url
,
fpath
)
except
:
if
url
[:
5
]
==
'https'
:
url
=
url
.
replace
(
'https:'
,
'http:'
)
print
(
'Failed download. Trying https -> http instead.'
' Downloading '
+
url
+
' to '
+
fpath
)
urllib
.
request
.
urlretrieve
(
url
,
fpath
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment