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
ccbb3221
Commit
ccbb3221
authored
Apr 18, 2019
by
Philip Meier
Committed by
Soumith Chintala
Apr 18, 2019
Browse files
Fix for ImageNet dataset (#858)
* Fix wrong doc string * bug fix
parent
81ca2a1d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
torchvision/datasets/imagenet.py
torchvision/datasets/imagenet.py
+2
-2
No files found.
torchvision/datasets/imagenet.py
View file @
ccbb3221
...
@@ -45,7 +45,7 @@ class ImageNet(ImageFolder):
...
@@ -45,7 +45,7 @@ class ImageNet(ImageFolder):
classes (list): List of the class names.
classes (list): List of the class names.
class_to_idx (dict): Dict with items (class_name, class_index).
class_to_idx (dict): Dict with items (class_name, class_index).
wnids (list): List of the WordNet IDs.
wnids (list): List of the WordNet IDs.
class
_to_idx (dict): Dict with items (wordnet_id,
wordnet_id
_index).
wnid
_to_idx (dict): Dict with items (wordnet_id,
class
_index).
imgs (list): List of (image path, class_index) tuples
imgs (list): List of (image path, class_index) tuples
targets (list): The class_index value for each image in the dataset
targets (list): The class_index value for each image in the dataset
"""
"""
...
@@ -156,7 +156,7 @@ def download_and_extract_tar(url, download_root, extract_root=None, filename=Non
...
@@ -156,7 +156,7 @@ def download_and_extract_tar(url, download_root, extract_root=None, filename=Non
md5
=
None
,
**
kwargs
):
md5
=
None
,
**
kwargs
):
download_root
=
os
.
path
.
expanduser
(
download_root
)
download_root
=
os
.
path
.
expanduser
(
download_root
)
if
extract_root
is
None
:
if
extract_root
is
None
:
extract_root
=
extract
_root
extract_root
=
download
_root
if
filename
is
None
:
if
filename
is
None
:
filename
=
os
.
path
.
basename
(
url
)
filename
=
os
.
path
.
basename
(
url
)
...
...
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