In Pytorch, is there any way of loading a specific single sample using the torch.utils.data.DataLoader
class? I'd like to do some testing with it.
The tutorial uses
trainloader = torch.utils.data.DataLoader(...)
images, labels = next(iter(trainloader))
to fetch a random batch of samples. Is there are way, using DataLoader
, to get a specific sample?
Cheers