Dear PyTorch community,

I am working on an optimization algorithm. This algorithm needs to take a random data in the dataloader at each iteration, so I do not have many epoch, but I have a max iteration variable (30000 for example). However, to implement it by the easiest way, I would have access to the dataset like I have access to a list:

```
for i_data in range(max_iter):
data = trainloader[i_data % len(trainloader)]
```

but the data loader object is not iterable. Do you have a solution ? I am working with the CIFAR10 data set.