Skip to content

Commit

Permalink
Merge pull request fastai#207 from PiotrCzapla/patch-1
Browse files Browse the repository at this point in the history
Make the resize_img use new_path argument
  • Loading branch information
jph00 authored Mar 13, 2018
2 parents 6165002 + ed3969a commit c91d04b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastai/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def resize_img(fname, targ, path, new_path):
def resize_imgs(fnames, targ, path, new_path):
if not os.path.exists(os.path.join(path,new_path,str(targ),fnames[0])):
with ThreadPoolExecutor(8) as e:
ims = e.map(lambda x: resize_img(x, targ, path, 'tmp'), fnames)
ims = e.map(lambda x: resize_img(x, targ, path, new_path), fnames)
for x in tqdm(ims, total=len(fnames), leave=False): pass
return os.path.join(path,new_path,str(targ))

Expand Down

0 comments on commit c91d04b

Please sign in to comment.