Here's my folder structure
image-folders/
├── class_0/
| ├── 001.jpg
| ├── 002.jpg
└── class_1/
| ├── 001.jpg
| └── 002.jpg
└── class_2/
├── 001.jpg
└── 002.jpg
By using ImageFolder from torchvision, I can create dataset with this syntax :
dataset = ImageFolder("image-folders",...)
But this will read the entire subfolder and create 3 target classes. I don't want to include the class_2 folder, I want my dataset to only contains class_0 and class_1 only, is there any way to achieve this besides delete/move the class_2 folder?