Skip to content
Advertisement

How to rearrange the sample order of a torch dataloader?

I have a “torch.utils.data.DataLoader”. I want to rearrange the order of the samples. Is it possible?

Advertisement

Answer

Yes, you can use torch.utils.data.Subset and specify the indices.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement