I train on 10% percentage of my data. I use subset randomsampler but it seems that it select different subsets each epoch, How can I fix the same subset each epoch
I’m not sure to understand the use case completely.
If you are calling this line of core once per epoch, you would only get a single batch.
On the other hand, if you are calling it in each iteration, you are recreating the Iterator every time.
Could you try to iterate the DataLoader directly via:
Thanks, it works, I think that the I was using for extracting single batch was taking single batch from whole data and not restricted to the subset sampler, when I tried :for data, target in loader: it is the same each epoch