Skip to content

Commit

Permalink
Merge pull request #14 from fpjentzsch/dev
Browse files Browse the repository at this point in the history
Fix: Sorting of labeled ImageNet subfolders
  • Loading branch information
maltanar authored Aug 27, 2021
2 parents ce4e090 + f9d44ea commit 61febea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions finn_examples/notebooks/2_imagenet_with_cnns.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"def setup_dataloader(val_path, label_file_path = None, batch_size=100, n_images = 50000):\n",
" if label_file_path is None:\n",
" val_folders = [ f.name for f in os.scandir(val_path) if f.is_dir() ]\n",
" val_folders = sorted(val_folders)\n",
" assert len(val_folders) == 1000, \"Expected 1000 subfolders in ILSVRC2012 val\"\n",
" files = []\n",
" labels = []\n",
Expand Down

0 comments on commit 61febea

Please sign in to comment.