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
40c99eae
Commit
40c99eae
authored
Jan 27, 2020
by
Tongzhou Wang
Committed by
Francisco Massa
Jan 27, 2020
Browse files
STL10: don't check integrity twice when download=True (#1787)
parent
536290df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
torchvision/datasets/stl10.py
torchvision/datasets/stl10.py
+2
-2
No files found.
torchvision/datasets/stl10.py
View file @
40c99eae
...
@@ -55,8 +55,7 @@ class STL10(VisionDataset):
...
@@ -55,8 +55,7 @@ class STL10(VisionDataset):
if
download
:
if
download
:
self
.
download
()
self
.
download
()
elif
not
self
.
_check_integrity
():
if
not
self
.
_check_integrity
():
raise
RuntimeError
(
raise
RuntimeError
(
'Dataset not found or corrupted. '
'Dataset not found or corrupted. '
'You can use download=True to download it'
)
'You can use download=True to download it'
)
...
@@ -161,6 +160,7 @@ class STL10(VisionDataset):
...
@@ -161,6 +160,7 @@ class STL10(VisionDataset):
print
(
'Files already downloaded and verified'
)
print
(
'Files already downloaded and verified'
)
return
return
download_and_extract_archive
(
self
.
url
,
self
.
root
,
filename
=
self
.
filename
,
md5
=
self
.
tgz_md5
)
download_and_extract_archive
(
self
.
url
,
self
.
root
,
filename
=
self
.
filename
,
md5
=
self
.
tgz_md5
)
self
.
_check_integrity
()
def
extra_repr
(
self
):
def
extra_repr
(
self
):
return
"Split: {split}"
.
format
(
**
self
.
__dict__
)
return
"Split: {split}"
.
format
(
**
self
.
__dict__
)
...
...
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