Unfortunately the creation of train_iterator is not shown in your code snippet, but I guess it might have been created via:
train_iterator = iter(train_loader)

This would allow you to manually get the next batch via next(train_iterator), but you would have to take care of the StopIteration manually.