Solved by ptrblck in post #2 
              
              
                It seems that _config["device"] contains a None entry, while a valid device (or device string) is needed. 
You could either make sure the _config dict contains a valid device or alternatively specify the device manually e.g. via: 
device = 'cuda' if torch.cuda.is_available else 'cpu'