What is the role of PyTorch dataset.imagefolder's loader option?
Actually, now I have a 10,000 images in a folder, but I want to use only 100 images. Now I load all the image and subset dataset by index.
from torch.utils.data import Subset
a = dset.ImageFolder(root=path_F,transform=transform)
index = list(range(0,100))
b = Subset(a,index)
Can loader option make my code simple?