Skip to content

Commit

Permalink
fix issue with unsorted file names
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhangDesai committed Nov 16, 2018
1 parent 713b225 commit 8dffbca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw6_release/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def load_dataset(data_dir, train=True, as_grey=False, shuffle=True, seed=131):
data_dir = os.path.join(data_dir, 'test')

for i, cls in enumerate(sorted(os.listdir(data_dir))):
for img_file in os.listdir(os.path.join(data_dir, cls)):
for img_file in sorted(os.listdir(os.path.join(data_dir, cls))):
img_path = os.path.join(data_dir, cls, img_file)
img = img_as_float(io.imread(img_path, as_grey=as_grey))
X.append(img)
Expand Down

0 comments on commit 8dffbca

Please sign in to comment.