Indexing over DataLoader suggests to use DataLoaderIter.sample_iter but it is not clear to me how.
I have used the following as suggested in Indexing over DataLoader.
DataLoaderIter = iter(trainloader)
for i in enumerate(DataLoaderIter.sample_iter) :
print i
But, interestingly this does not return the indices of the first two batches. Do you how can I fix this?
Thanks.