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
a485b8c6
"torchvision/vscode:/vscode.git/clone" did not exist on "7492fae4c2cd16fb2783dce7e7583d7245cfbe92"
Unverified
Commit
a485b8c6
authored
Oct 07, 2021
by
Philip Meier
Committed by
GitHub
Oct 07, 2021
Browse files
simplify QMNIST download logic (#4562)
parent
05dcf50a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
torchvision/datasets/mnist.py
torchvision/datasets/mnist.py
+1
-4
No files found.
torchvision/datasets/mnist.py
View file @
a485b8c6
...
@@ -466,10 +466,7 @@ class QMNIST(MNIST):
...
@@ -466,10 +466,7 @@ class QMNIST(MNIST):
split
=
self
.
resources
[
self
.
subsets
[
self
.
what
]]
split
=
self
.
resources
[
self
.
subsets
[
self
.
what
]]
for
url
,
md5
in
split
:
for
url
,
md5
in
split
:
filename
=
url
.
rpartition
(
"/"
)[
2
]
download_and_extract_archive
(
url
,
self
.
raw_folder
,
md5
=
md5
)
file_path
=
os
.
path
.
join
(
self
.
raw_folder
,
filename
)
if
not
os
.
path
.
isfile
(
file_path
):
download_and_extract_archive
(
url
,
self
.
raw_folder
,
filename
=
filename
,
md5
=
md5
)
def
__getitem__
(
self
,
index
:
int
)
->
Tuple
[
Any
,
Any
]:
def
__getitem__
(
self
,
index
:
int
)
->
Tuple
[
Any
,
Any
]:
# redefined to handle the compat flag
# redefined to handle the compat flag
...
...
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