Skip to content

Commit

Permalink
DS_Store fix in find_classes (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
NC Cullen authored and soumith committed Feb 27, 2017
1 parent 39a50de commit c0a6cfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchvision/datasets/folder.py
Expand Up @@ -15,7 +15,7 @@ def is_image_file(filename):


def find_classes(dir):
classes = os.listdir(dir)
classes = [d for d in os.listdir(dir) if os.path.isdir(os.path.join(dir, d))]
classes.sort()
class_to_idx = {classes[i]: i for i in range(len(classes))}
return classes, class_to_idx
Expand Down

0 comments on commit c0a6cfe

Please sign in to comment.