Skip to content

running test_kitti.py #21

@darkdevahm

Description

@darkdevahm

I'm getting the following error when running python3 test_kitti.py eventhough I have cuda and torch, I have also verified cuda using torch.cuda.is_available and it was True.

Traceback (most recent call last): File "test_kitti.py", line 407, in <module> model.load_state_dict(torch.load('../../pre-trained_models/KITTI_best.pkl')) File "/home/ahmed/anaconda3/envs/spinnet/lib/python3.6/site-packages/torch/serialization.py", line 584, in load return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args) File "/home/ahmed/anaconda3/envs/spinnet/lib/python3.6/site-packages/torch/serialization.py", line 842, in _load result = unpickler.load() File "/home/ahmed/anaconda3/envs/spinnet/lib/python3.6/site-packages/torch/serialization.py", line 834, in persistent_load load_tensor(data_type, size, key, _maybe_decode_ascii(location)) File "/home/ahmed/anaconda3/envs/spinnet/lib/python3.6/site-packages/torch/serialization.py", line 823, in load_tensor loaded_storages[key] = restore_location(storage, location) File "/home/ahmed/anaconda3/envs/spinnet/lib/python3.6/site-packages/torch/serialization.py", line 174, in default_restore_location result = fn(storage, location) File "/home/ahmed/anaconda3/envs/spinnet/lib/python3.6/site-packages/torch/serialization.py", line 150, in _cuda_deserialize device = validate_cuda_device(location) File "/home/ahmed/anaconda3/envs/spinnet/lib/python3.6/site-packages/torch/serialization.py", line 134, in validate_cuda_device raise RuntimeError('Attempting to deserialize object on a CUDA ' RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions