Skip to content

Commit

Permalink
Ignore hidden folders for image_dataset_from_directory
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinprasadhs authored Jun 2, 2023
1 parent 31af45e commit 9bc903b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keras/utils/dataset_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def index_directory(
else:
subdirs = []
for subdir in sorted(tf.io.gfile.listdir(directory)):
if tf.io.gfile.isdir(tf.io.gfile.join(directory, subdir)) and not subdir.startswith("."):
if tf.io.gfile.isdir(tf.io.gfile.join(directory, subdir))and subdir[0]!='.':
if subdir.endswith("/"):
subdir = subdir[:-1]
subdirs.append(subdir)
Expand Down

0 comments on commit 9bc903b

Please sign in to comment.