Does the error related to the os configuration?
I have run the same code on two server with the same os (Ubuntu16.04.1) but different gpu. And set num_workers=12 in DataLoader for both. One can run normally but another raise the ValueError mentioned above.