Not sure if that’s going to work. It can break if itertools.chain iterator is not immutable (and it’s probably not). It would be simpler to do this (or use the wrapper dataset):
for epoch in range(num_epochs):
    dset = itertools.chain(...)
    dloader = # create DataLoader
    for ... in dloader:
        ...