輸入以下代碼進行調試:
python3 keras_retinanet/bin/train.py csv keras_retinanet/CSV/train_annotations.csv keras_retinanet/CSV/classes.csv
報以下錯誤1:
fatal error: Python.h: No such file or directory
fatal error: numpy/arrayobject.h: No such file or directory
方法一:(https://www.cnblogs.com/cj695/p/5216211.html)
apt-get install python-numpy
提示缺包
通過運行以下命令確保您的系統和apt包列表完全更新:(https://www.linuxidc.com/Linux/2018-05/152610.htm)
apt-get update -y
apt-get upgrade -y
問題解決
再次運行,報錯誤2:
You are using keras version 2.1.5. The minimum required version is 2.3.0.
更新keras版本:pip3 install --upgrade keras
再次運行,報錯誤3:
ImportError: cannot import name 'tf_utils'
可以看到錯誤二和錯誤三是一個循環,針對錯誤二找解決辦法,查看文件發現train.py裏有一個判別語句,將check_keras_version()語句註釋掉就可以了。(同時也註釋掉了debug.py裏的check語句)