收集的大家踩的坑
https://blog.csdn.net/wolfhunterhu/article/details/91489601
https://blog.csdn.net/u010826850/article/details/103666308
自己遇到的一些問題
1、ImportError: cannot import name imread
將scipy降級
pip install scipy==1.2.1
2、ValueError: object __array__ method not producing an array
解決:https://github.com/chenyuntc/simple-faster-rcnn-pytorch/issues/72
3、RuntimeError: DataLoader worker (pid 22960) is killed by signal: Killed.
Docker中運行Pytorch,並且DataLoader採用了多進程(num_workers>0),當內存不足時報錯。
https://blog.csdn.net/songyu0120/article/details/89170030
這個問題就是,數據在加載過程中耗盡了內存
解決:https://blog.csdn.net/zhangyunpeng0922/article/details/86524250
4、undefined symbol: _ZN2at19UndefinedTensorImpl10_singletonE
刪除lib\build中的內容,並重新在lib目錄下運行
python setup.py build develop
類似問題還可參考:
https://github.com/jwyang/faster-rcnn.pytorch/issues/503
5、ImportError: cannot import name '_mask'
或者ModuleNotFoundError: no module named'pycocotools_mask'
運行
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
make
make install
然後將/data/cocoapi/PythonAPI/pycocotools整個文件夾複製覆蓋lib/pycocotools文件夾