1,TensorFlow 版本的问题
报错: RuntimeError: `get_session` is not available when using TensorFlow 2.0.
解决办法: 这个问题是 TensorFlow 版本问题, 在 2.0 以上 get_session 是被移除了. 需要做一些修改, 或者把 tf 降级. 可以安装 1.15 版本: pip install tensorflow==1.15 --upgrade
参考链接: http://30daydo.com/article/561
2,python 版本问题
报错: 安装 TensorFlow1.15.2 时, Could not find a version that satisfies the requirement tensorflow
解决办法: TensorFlow 版本不支持 Python3.7, 改为 3.6 即可
参考链接: https://blog.csdn.net/xavier_muse/article/details/83998744
3,keras 版本问题, 模型训练时出现问题
报错: AttributeError: module 'keras.backend' has no attribute 'control_flow_ops'
解决办法: 直接把 keras 卸载 pip uninstall keras, 重新安装指定版本 keras pip install keras==2.1.5
参考链接: https://www.lizenghai.com/archives/39235.html
4,Keras+yolo3 训练自己的数据时 运行 train.py
报错: TypeError: 'NoneType' object is not iterable
解决办法: 需要生成好 "Annotations" 的 xml 文件后, 再生成 ImageSets/Main 下的 txt 文件
参考链接: https://blog.csdn.net/helloworldsyf/article/details/104212485
未完待续~~~
总结: 模型训练需要的环境, 括号内是版本号, 没指定版本的话可以不考虑 (小版本号可以不考虑), 按照安装顺序来
python(3.6),numpy,TensorFlow(1.15.2),Keras(2.1.5),pillow-PIL,matplotlib,opencv-python
来源: http://www.bubuko.com/infodetail-3475298.html