Based on the first post I assume that your code runs fine with num_workers=0 for the full epoch and doesn’t yield any error?
If that’s the case, could you check if you have enough shared memory available?