@tux,
I’m new to Python so I might miss the point.
I’d like to have something like:
trainData, trainLabels = trainLoader.SampleByIdx(batchIdx)
Assuming SampleByIdx is my own defined sampler.
It seems the magic in RandomSampler happens at return iter(torch.randperm(len(self.data_source)).long()).
I just don’t understand where the samples are loaded in this line.
Thank You.
P. S.
I think I fixed typos, thank you for letting me know.