upgrade pytorch to latest version
when using CUDA with multiprocessing, you have to use the spawn or forkserver method as mentioned in http://pytorch.org/docs/master/notes/multiprocessing.html#sharing-cuda-tensors 127


I think (2) is the reason for your deadlock.