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
cbf19d4f
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "9d79991da0f1ba059f340eef187d88eac50a7bc6"
Commit
cbf19d4f
authored
Jan 30, 2018
by
Chang
Committed by
Francisco Massa
Jan 29, 2018
Browse files
Use consistent datatypes in DataSet targets (#389)
parent
1dd2d66e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
torchvision/datasets/semeion.py
torchvision/datasets/semeion.py
+1
-1
torchvision/datasets/svhn.py
torchvision/datasets/svhn.py
+1
-1
No files found.
torchvision/datasets/semeion.py
View file @
cbf19d4f
...
@@ -60,7 +60,7 @@ class SEMEION(data.Dataset):
...
@@ -60,7 +60,7 @@ class SEMEION(data.Dataset):
Returns:
Returns:
tuple: (image, target) where target is index of the target class.
tuple: (image, target) where target is index of the target class.
"""
"""
img
,
target
=
self
.
data
[
index
],
self
.
labels
[
index
]
img
,
target
=
self
.
data
[
index
],
int
(
self
.
labels
[
index
]
)
# doing this so that it is consistent with all other datasets
# doing this so that it is consistent with all other datasets
# to return a PIL Image
# to return a PIL Image
...
...
torchvision/datasets/svhn.py
View file @
cbf19d4f
...
@@ -89,7 +89,7 @@ class SVHN(data.Dataset):
...
@@ -89,7 +89,7 @@ class SVHN(data.Dataset):
Returns:
Returns:
tuple: (image, target) where target is index of the target class.
tuple: (image, target) where target is index of the target class.
"""
"""
img
,
target
=
self
.
data
[
index
],
self
.
labels
[
index
]
img
,
target
=
self
.
data
[
index
],
int
(
self
.
labels
[
index
]
)
# doing this so that it is consistent with all other datasets
# doing this so that it is consistent with all other datasets
# to return a PIL Image
# to return a PIL Image
...
...
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