The orders of data in dataloader

Hi I had one datasets I made a dataloader of this dataset. I wanted to extract features of my datasets from a model. I dont know when I make a dataloader with batch = 1 and shuffle false is the data loader organized or not? I mean I wanted to know is the first data in my dataloader exactly first data in my dataset that I made dataloader of? How can I understand which data from my dataset loads to dataloader? Because the order of dataloader is important for me.

If shuffle=False is set then a SequentialSampler will be used which will pass the indices in order to the Dataset.__getitem__. You could print the index in the __getitem__ and would see the used order.

1 Like

shuffle=False is like shooting your own hand. Don’t hurt yourself. Use shuffle=True.
And note false should be False in your question.