snowe:

How does that make sense?


The order of the returned batches from your DataLoader would still be different, which would yield non-deterministic results. Note that this is usually not a problem, as your model should converge with different seeds.



 snowe:

What do you mean with iterate the DataLoader for 15 epochs?


If the DataLoader was the only source of randomness, you could use:
for _ in range(epochs_to_restore):
    for batch in loader:
        pass

However, this approach is brittle and will not work, if you had other calls into the random number generator.