Hi
I’m trying to get data for the next iteration in the dataloader loop.
The point is I need both data for the current iteration and the one for the next iteration or even for n times the next iteration.
So I did following.
for num_iter, (img, label) in enumerate(train_loader):
        train_loader_list = list(train_loader)
        tuple = train_loader_list[num_iter]

I was going to get data for the next iteration by doing train_loader_list[num_iter+1]
but tuple[0] and img were different!
I think it’s because of shuffle=True.
In this case, what’s the most efficient way to get both data for the current iteration and the one for the n times next iteration?