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
8aec85de
Commit
8aec85de
authored
Nov 18, 2019
by
Tongzhou Wang
Committed by
Francisco Massa
Nov 18, 2019
Browse files
DatasetFolder should follow links when searching for data (#1580)
parent
abeecb35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchvision/datasets/folder.py
torchvision/datasets/folder.py
+1
-1
No files found.
torchvision/datasets/folder.py
View file @
8aec85de
...
@@ -44,7 +44,7 @@ def make_dataset(dir, class_to_idx, extensions=None, is_valid_file=None):
...
@@ -44,7 +44,7 @@ def make_dataset(dir, class_to_idx, extensions=None, is_valid_file=None):
d
=
os
.
path
.
join
(
dir
,
target
)
d
=
os
.
path
.
join
(
dir
,
target
)
if
not
os
.
path
.
isdir
(
d
):
if
not
os
.
path
.
isdir
(
d
):
continue
continue
for
root
,
_
,
fnames
in
sorted
(
os
.
walk
(
d
)):
for
root
,
_
,
fnames
in
sorted
(
os
.
walk
(
d
,
followlinks
=
True
)):
for
fname
in
sorted
(
fnames
):
for
fname
in
sorted
(
fnames
):
path
=
os
.
path
.
join
(
root
,
fname
)
path
=
os
.
path
.
join
(
root
,
fname
)
if
is_valid_file
(
path
):
if
is_valid_file
(
path
):
...
...
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