I am able to run my program on system with CUDA 9.2, Quadro M5000 (5), and python 3.7.0 (anaconda) while the same program giving me an error on another system with the CUDA 10.0, GeForce GTX 1080 Ti (6), and python 3.7.1
 ForkingPickler(file, protocol).dump(obj)

BrokenPipeError: [Errno 32] Broken pipe

the whole code wrap in a function named  train_valid_model()  and just add the  main  guard in the  script:
def train_valid_model():
    # complete code here

if __name__=='__main__':
    train_valid_model()

In Anaconda Prompt to make sure about is CUDA available I’ve done this import torch torch.cuda.is_available() and it’s returning True while it’s not able to do this t_image = t_image.to(device)
It only works when num_workers=0 and if I set it to 1 or 2 I will get this error. Any idea why I am  getting this error while the program is same just the CUDA version and python version are different?