Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix expanduser
Browse files Browse the repository at this point in the history
  • Loading branch information
zhreshold committed Mar 3, 2018
1 parent f0178bd commit 86099af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/gluon/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_imagenet_iterator(root, batch_size, num_workers, data_shape=224, dtype='
train_data = DataLoader(train_dataset, batch_size, shuffle=True,
last_batch='discard', num_workers=num_workers)
val_dir = os.path.join(root, 'val')
if not os.path.isdir(os.path.join(root, 'val', 'n01440764')):
if not os.path.isdir(os.path.join(os.path.expanduser(root, 'val', 'n01440764'))):
user_warning = 'Make sure validation images are stored in one subdir per category, a helper script is available at https://git.io/vNQv1'
raise ValueError(user_warning)
logging.info("Loading image folder %s, this may take a bit long...", val_dir)
Expand Down

0 comments on commit 86099af

Please sign in to comment.