Hi,
I have been following some pytorch tutorials where they use datasets.ImageFolder and then utils.data.DataLoader to iterate across the data set. This, however is a big problem for me, as the task I am trying to solve strictly requires me to have full knowledge on which specific image I am passing through my neural network.
In my task I am comparing images, and the images are numbered, and so when comparing some images with my net I need to be able to specify that I wish to run image ‘i’ and then image ‘j’ through the neural network.
This is how I am imagining it:
image_datasets = datasets.ImageFolder(os.path.join(data_dir, 'food'), transform= data_transforms)

dataloaders = torch.utils.data.DataLoader(image_datasets, batch_size=1, shuffle=False, num_workers=0)

output1 = model(dataloaders[i])
output2 = model(dataloaders[j])

Nothing like this seems to exist. How can I access data of my choice?