01. SEGMENTATION FAULT
正在配置OCNET的代碼,在自己的本地運行沒有任何問題,但是在服務器上一直報錯:SEGMENTATION FAULT
這屬於很概括的報錯,無法直接看明白到底是什么問題,同時在服務器端也沒有界面,所以就倒逼着我去學習了PDB工具,學習鏈接如下:
https://www.ibm.com/developerworks/cn/linux/l-cn-pythondebugger/index.html
經過一番排查,最終確定,是
僅僅使用如下命令是不夠的
import matplotlib.pyplot as plt
必須要用這樣的三行完整版本:
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt
同時,感慨一下,PDB真好用啊!!
02. undefined symbol: __cudaPopCallConfiguration
參考:https://github.com/jwyang/faster-rcnn.pytorch/issues/190
是pytorch的版本和cuda版本不一致。
Pytorch安裝參考:https://pytorch.org/get-started/previous-versions/
我使用的是cuda 9.2,使用`nvcc -V`可以查詢到
安裝:
conda install pytorch=0.4.1 torchvision cuda80 -c pytorch
注意:官方給的是下面的命令,安裝后再去單獨安裝torchvision會出現版本沖突(無論是conda還是pip)
conda install pytorch=0.4.1 cuda80 -c pytorch
在conda中,把所有要安裝的包一次性寫到同一行里,就不會出現版本沖突的問題。
03. AttributeError: 'NoneType' object has no attribute 'copy'
數據集沒讀取到,路徑不對
04. ImportError: libbz2.so.1.0: cannot open shared object file: No such file or directory
conda 方式安裝opencv會有問題,使用pip方式安裝即可:
pip install opencv-python
05. subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
請參考:https://github.com/mapillary/inplace_abn/issues/106#issuecomment-475460496
具體來說就是cuda版本, gcc版本的不正確
06. 一些別的問題
https://blog.csdn.net/pku_Coder/article/details/85111082