weights_dict = torch.load(weightspath)
  File "/home/user/local/python3/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 229, in load
    return _load(f, map_location, pickle_module)
  File "/home/user/local/python3/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 377, in _load
    result = unpickler.load()
  File "/home/user/local/python3/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 348, in persistent_load
    data_type(size), location)
  File "/home/user/local/python3/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 85, in default_restore_location
    result = fn(storage, location)
  File "/home/user/local/python3/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 67, in _cuda_deserialize
    return obj.cuda(device_id)
  File "/home/user/local/python3/anaconda3/lib/python3.6/site-packages/torch/_utils.py", line 57, in _cuda
    with torch.cuda.device(device):
  File "/home/user/local/python3/anaconda3/lib/python3.6/site-packages/torch/cuda/__init__.py", line 127, in __enter__
    torch._C._cuda_setDevice(self.idx)
RuntimeError: cuda runtime error (10) : invalid device ordinal at torch/csrc/cuda/Module.cpp:84