WuJie1010 / Facial-Expression-Recognition.Pytorch

A CNN based pytorch implementation on facial expression recognition (FER2013 and CK+), achieving 73.112% (state-of-the-art) in FER2013 and 94.64% in CK+ dataset
MIT License
1.78k stars 545 forks source link

pytorch cpu版运行报错 #78

Closed wwzh2015 closed 4 years ago

wwzh2015 commented 4 years ago

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.

怎么改成cpu版本运行

WuJie1010 commented 4 years ago

please refer to https://github.com/WuJie1010/Facial-Expression-Recognition.Pytorch/issues/9

upgradwang commented 2 years ago

device = ('cuda' if torch.cuda.is_available() else 'cpu') use_cuda=device 这样改就改成CPU运行了