Dataloader for 'unsupervised learning by predicting noise'

Hello Everyone,

New convert to pytorch here. I’m trying to implement the paper ‘unsupervised learning by predicting noise’ by Bojanowski et al. To do a sanity test i’m testing on the cifar10 dataset. I had two questions regarding the dataloader from torchvision.datasets.

  1. is it possible to shuffle the dataset once and then keep it constant till such time that a shuffle command is called again (as opposed to shuffling every epoch).

  2. is it possible to get the index of the instances in the batch (this would allow me to associate it with a noise vector).

Or would it be better to write my own dataloader?

Thanks in anticipation.