If you are running on a CPU-only machine, please use torch.load with map_location='cpu' to map your storages to the CPU.
marcoippolito opened this issue · 0 comments
marcoippolito commented
nohup python main.py --config="cfgs/fishnet150-32.yaml" --b 32 --lr 0.01 --every-decay 30 --fl-
gamma 2 >> fishnet150-train.log
Traceback (most recent call last):
File "main.py", line 406, in <module>
main()
File "main.py", line 113, in main
model = models.__dict__[args.arch]()
File "/home/marco/antiFaceSpoofing/FeatherNets_Face-Anti-spoofing-Attack-Detection-
Challenge-CVPR2019-regression/models/net_factory.py", line 27, in fishnet150
state_dict = torch.load(path)
File "/home/marco/anaconda3/envs/env_name/lib/python3.6/site-packages/torch
/serialization.py", line 368, in load
return _load(f, map_location, pickle_module)
File "/home/marco/anaconda3/envs/env_name/lib/python3.6/site-packages/torch
/serialization.py", line 542, in _load
result = unpickler.load()
File "/home/marco/anaconda3/envs/env_name/lib/python3.6/site-packages/torch
/serialization.py", line 505, in persistent_load
data_type(size), location)
File "/home/marco/anaconda3/envs/env_name/lib/python3.6/site-packages/torch
/serialization.py", line 114, in default_restore_location
result = fn(storage, location)
File "/home/marco/anaconda3/envs/env_name/lib/python3.6/site-packages/torch
/serialization.py", line 95, in _cuda_deserialize
device = validate_cuda_device(location)
File "/home/marco/anaconda3/envs/env_name/lib/python3.6/site-packages/torch
/serialization.py", line 79, 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='cpu' to map your storages to the CPU.