The DataLoader loop should exit after 163 iterations and would be executed epochs times.
Add a print statement to the inner loop and check the current loop index.
Since this loop apparently never exits, it would help to debug this issue.