Commit c0a6cfe1 authored by NC Cullen's avatar NC Cullen Committed by Soumith Chintala
Browse files

DS_Store fix in find_classes (#79)

parent 39a50de1
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment