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
b1fb79f9
"projects/git@developer.sourcefind.cn:OpenDAS/pytorch3d.git" did not exist on "5eec5e289e17d90f59faf18c87137dbd4e589e97"
Commit
b1fb79f9
authored
Apr 26, 2019
by
Surgan Jandial
Committed by
Francisco Massa
Apr 25, 2019
Browse files
minor improvments (#874)
parent
c0c696fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
torchvision/datasets/folder.py
torchvision/datasets/folder.py
+2
-4
No files found.
torchvision/datasets/folder.py
View file @
b1fb79f9
...
...
@@ -35,10 +35,8 @@ def is_image_file(filename):
def
make_dataset
(
dir
,
class_to_idx
,
extensions
=
None
,
is_valid_file
=
None
):
images
=
[]
dir
=
os
.
path
.
expanduser
(
dir
)
if
extensions
is
None
and
is_valid_file
is
None
:
raise
ValueError
(
"Both extensions and is_valid_file cannot be None"
)
if
extensions
is
not
None
and
is_valid_file
is
not
None
:
raise
ValueError
(
"One of the extensions and is_valid_file should be None"
)
if
not
((
extensions
is
None
)
^
(
is_valid_file
is
None
)):
raise
ValueError
(
"Both extensions and is_valid_file cannot be None or not None at the same time"
)
if
extensions
is
not
None
:
def
is_valid_file
(
x
):
return
has_file_allowed_extension
(
x
,
extensions
)
...
...
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