Issues with Dataloader for imagenet (should I use datasets.ImageFolder or datasets.ImageNet)?

@seyeeet The script that I’m referring to is linked in my reply above: examples/imagenet at master · pytorch/examples · GitHub

That said, I haven’t used the script directly, I simply tried to reuse the code part that sets up the dataloaders which starts here examples/main.py at master · pytorch/examples · GitHub and that works for me.
Just make sure that you follow the setup instructions that are listed here examples/imagenet at master · pytorch/examples · GitHub. In particular, you have to execute the shell script, that’s mentioned in the last step, inside the val folder (ILSVRC/Data/CLS-LOC/val/). This makes sure that the val folder is structured in a way that can be understood by the ImageFolder class.

3 Likes