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
a7935ea6
Commit
a7935ea6
authored
Sep 17, 2018
by
Kyryl Truskovskyi
Committed by
Francisco Massa
Sep 17, 2018
Browse files
cast mnist targer to int (#605)
parent
e15e81f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchvision/datasets/mnist.py
torchvision/datasets/mnist.py
+1
-1
No files found.
torchvision/datasets/mnist.py
View file @
a7935ea6
...
@@ -67,7 +67,7 @@ class MNIST(data.Dataset):
...
@@ -67,7 +67,7 @@ class MNIST(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
.
targets
[
index
]
img
,
target
=
self
.
data
[
index
],
int
(
self
.
targets
[
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