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
c6fbadc5
"git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "cc43e0a98368055d7a661651a2b9dbf28a19e533"
Commit
c6fbadc5
authored
Feb 27, 2017
by
Soumith Chintala
Committed by
Soumith Chintala
Feb 27, 2017
Browse files
check for non-zero number of images in ImageFolder
parent
f0a13fdc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
torchvision/datasets/folder.py
torchvision/datasets/folder.py
+3
-0
tox.ini
tox.ini
+0
-0
No files found.
torchvision/datasets/folder.py
View file @
c6fbadc5
...
@@ -47,6 +47,9 @@ class ImageFolder(data.Dataset):
...
@@ -47,6 +47,9 @@ class ImageFolder(data.Dataset):
loader
=
default_loader
):
loader
=
default_loader
):
classes
,
class_to_idx
=
find_classes
(
root
)
classes
,
class_to_idx
=
find_classes
(
root
)
imgs
=
make_dataset
(
root
,
class_to_idx
)
imgs
=
make_dataset
(
root
,
class_to_idx
)
if
len
(
imgs
)
==
0
:
raise
(
RuntimeError
(
"Found 0 images in subfolders of: "
+
root
+
"
\n
"
"Supported image extensions are: "
+
","
.
join
(
IMG_EXTENSIONS
)))
self
.
root
=
root
self
.
root
=
root
self
.
imgs
=
imgs
self
.
imgs
=
imgs
...
...
setup.cfg
→
tox.ini
View file @
c6fbadc5
File moved
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