常见报错汇总
常见报错汇总
PyTorch
报错:
1 | 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. |
解决:
1 | torch.load(xxx)改成 torch.load(xxx,map_location='cpu') |
TensorFlow
报错:
1 | tensorflow2.0加载model出现AttributeError: ‘str‘ object has no attribute ‘decode‘ |
解决:
1 | 把h5py降到2.10.0版本就行了!!!! |
Nginx
报错:
1 | nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use) |
解决:
- 查看443端口是否被占用?是哪个占用的?
1 | netstat -anon | grep 443 |
- 杀掉占用的443端口的进程
1 | fuser -k 443/tcp |
- 重启nginx
1 | service nginx start |
- 重新加载配置文件
1 | nginx -s reload |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 没有胡子的猫Asimok!
评论