Solved by tux in post #13 
              
              
                It is not loaded in this line. RandomSampler class is just a tool for the Dataloader class. As I said before, if you have a look to the Dataloader class, you will find this : 
  if batch_sampler is None:
        if sampler is None:
            if shuffle:
                sampler = RandomSampler(data…