In my case, I find that it caused by out of memory of machine(note that , not GPU memory). To test that when run your code, you can use command top to see the whether the memory and swap memory are used up. If so , it is the memory problem. You can  use a small batch, use a small num_workers, expand your swap memory,etc. Any way could decrease your memory load would be helpful.
113$89P%UWQVSN]PQ3H}_`T.png701×96 7.44 KB