That’s because the dataloader  finished iterating once over the whole dataset.
You can make a iteration cycle to avoid this:
def cycle(iterable):
    while True:
        for x in iterable:
            yield x

...

batch_iterator =iter(cycle(data_loader))