Solved by ljj7975 in post #10 
              
              
                I actually have narrowed the issue down. 
it seems to be happening when I tried to use more than 1 GPU. 
def prepare_device(n_gpu_use):
    """
    setup GPU device if available, move model into configured device
    """
    n_gpu = torch.cuda.device_count()
    if n_gpu_use > 0 and n_gpu == 0:
    …