Skip to content

Commit 7cae7e7

Browse files
committed
Follow links during dataset scanning
1 parent 392595c commit 7cae7e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

timm/data/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def natural_key(string_):
2626
def find_images_and_targets(folder, types=IMG_EXTENSIONS, class_to_idx=None, leaf_name_only=True, sort=True):
2727
labels = []
2828
filenames = []
29-
for root, subdirs, files in os.walk(folder, topdown=False):
29+
for root, subdirs, files in os.walk(folder, topdown=False, followlinks=True):
3030
rel_path = os.path.relpath(root, folder) if (root != folder) else ''
3131
label = os.path.basename(rel_path) if leaf_name_only else rel_path.replace(os.path.sep, '_')
3232
for f in files:

0 commit comments

Comments
 (0)