Skip to content

Commit

Permalink
Merge pull request fastai#178 from AdityaSoni19031997/patch-2
Browse files Browse the repository at this point in the history
Update dataset.py
  • Loading branch information
jph00 authored Feb 27, 2018
2 parents 09c32d5 + 8e8e0db commit 762f0b6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions fastai/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ def read_dirs(path, folder):
labels, filenames, all_labels = [], [], []
full_path = os.path.join(path, folder)
for label in sorted(os.listdir(full_path)):
all_labels.append(label)
for fname in os.listdir(os.path.join(full_path, label)):
filenames.append(os.path.join(folder, label, fname))
labels.append(label)
if label not in ('.ipynb_checkpoints'):
all_labels.append(label)
for fname in os.listdir(os.path.join(full_path, label)):
filenames.append(os.path.join(folder, label, fname))
labels.append(label)
return filenames, labels, all_labels

def create_sample(path, r):
Expand Down

0 comments on commit 762f0b6

Please sign in to comment.