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
3b6c6706
You need to sign in or sign up before continuing.
Commit
3b6c6706
authored
Mar 20, 2018
by
reynoldscem
Committed by
Soumith Chintala
Mar 20, 2018
Browse files
Fix for issue #447 - STL dataset returns test fold if fold is misspecified (#449)
parent
c76ac7ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
torchvision/datasets/stl10.py
torchvision/datasets/stl10.py
+5
-0
No files found.
torchvision/datasets/stl10.py
View file @
3b6c6706
...
@@ -41,9 +41,14 @@ class STL10(CIFAR10):
...
@@ -41,9 +41,14 @@ class STL10(CIFAR10):
[
'test_X.bin'
,
'7f263ba9f9e0b06b93213547f721ac82'
],
[
'test_X.bin'
,
'7f263ba9f9e0b06b93213547f721ac82'
],
[
'test_y.bin'
,
'36f9794fa4beb8a2c72628de14fa638e'
]
[
'test_y.bin'
,
'36f9794fa4beb8a2c72628de14fa638e'
]
]
]
splits
=
(
'train'
,
'train+unlabeled'
,
'unlabeled'
,
'test'
)
def
__init__
(
self
,
root
,
split
=
'train'
,
def
__init__
(
self
,
root
,
split
=
'train'
,
transform
=
None
,
target_transform
=
None
,
download
=
False
):
transform
=
None
,
target_transform
=
None
,
download
=
False
):
if
split
not
in
self
.
splits
:
raise
ValueError
(
'Split "{}" not found. Valid splits are: {}'
.
format
(
split
,
', '
.
join
(
self
.
splits
),
))
self
.
root
=
os
.
path
.
expanduser
(
root
)
self
.
root
=
os
.
path
.
expanduser
(
root
)
self
.
transform
=
transform
self
.
transform
=
transform
self
.
target_transform
=
target_transform
self
.
target_transform
=
target_transform
...
...
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