How to Load ImageNet Dataset in PyTorch
Thank you for your question. You can load the ImageNet dataset in PyTorch by following these steps:
- Import the torchvision package:
from torchvision import datasets
- Change the way of loading Imagenet dataset in lines L156-L164:
root = os.path.join(config.DATA.DATA_PATH, prefix)
dataset = datasets.ImageFolder(root, transform=transform)
We'll update the code with further explanations and optimizations later. Stay tuned!
原文地址: https://www.cveoy.top/t/topic/oeh8 著作权归作者所有。请勿转载和采集!