错误1 :
运行Python demo.py error:
Traceback (most recent call last):
File "demo.py", line 6, in
from core.detectors import CornerNet_Squeeze
File "/data/shiwei/CornerNet_Lite/core/detectors.py", line 1, in
from .base import Base, load_cfg, load_nnet
File "/data/shiwei/CornerNet_Lite/core/base.py", line 3, in
from .nnet.py_factory import NetworkFactory
File "/data/shiwei/CornerNet_Lite/core/nnet/py_factory.py", line 7, in
from ..models.py_utils.data_parallel import DataParallel
File "/data/shiwei/CornerNet_Lite/core/models/py_utils/__init__.py", line 1, in
from ._cpools import TopPool, BottomPool, LeftPool, RightPool
File "/data/shiwei/CornerNet_Lite/core/models/py_utils/_cpools/__init__.py", line 6, in
import top_pool, bottom_pool, left_pool, right_pool
ImportError: /root/.local/lib/python3.7/site-packages/cpools-0.0.0-py3.7-linux-x86_64.egg/top_pool.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationERKSs
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False.
错误2:
运行python train.py
AssertionError:
The NVIDIA driver on your system is too old (found version 9020).
但是,(CornerNet_Lite) root@cornernet-lite2-q495tfuz2:/data/shiwei/CornerNet_Lite# cat /usr/local/cuda/version.txt
CUDA Version 10.0.130
详细:
AttributeError: 'NoneType' object has no attribute 'shape'
setting learning rate to: 0.00025
training start...
start prefetching data...
Traceback (most recent call last):
File "train.py", line 249, in
main(None, ngpus_per_node, args)
File "train.py", line 233, in main
train(training_dbs, validation_db, system_config, model, args)
File "train.py", line 160, in train
nnet.cuda()
File "/data/shiwei/CornerNet_Lite/core/nnet/py_factory.py", line 75, in cuda
self.model.cuda()
File "/root/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/nn/modules/module.py", line 260, in cuda
return self._apply(lambda t: t.cuda(device))
File "/root/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/nn/modules/module.py", line 187, in _apply
shuffling indices...
module._apply(fn)
File "/root/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/nn/modules/module.py", line 187, in _apply
module._apply(fn)
File "/root/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/nn/modules/module.py", line 187, in _apply
module._apply(fn)
[Previous line repeated 2 more times]
File "/root/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/nn/modules/module.py", line 193, in _apply
param.data = fn(param.data)
File "/root/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/nn/modules/module.py", line 260, in
return self._apply(lambda t: t.cuda(device))
File "/root/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/cuda/__init__.py", line 161, in _lazy_init
_check_driver()
File "/root/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/cuda/__init__.py", line 91, in _check_driver
of the CUDA driver.""".format(str(torch._C._cuda_getDriverVersion())))
AssertionError:
The NVIDIA driver on your system is too old (found version 9020).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
错误3:
torch.cuda.is_available() is false
错误4:降低torch版本,行不通
解决:
卸载conda从txt列表安装的pytorch和cuda100,重新安装
conda create --name CornerNet_Lite --file conda_packagelist.txt
source activate CornerNet_Lite
conda uninstall pytorch cuda100
conda install pytorch=1.0.0 torchvision
conda list
pytorch 1.0.0 py3.7_cuda9.0.176_cudnn7.4.1_1 http://mirrors.源.com.cn/anaconda/cloud/pytorch