问题描述
tensorflow object detection API训练coco数据集时提示错误:Windows fatal exception: access violation,如下图:
The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.
Windows fatal exception: access violation
Current thread 0x00003158 (most recent call first):
解决方案
参考了这篇博客,说是要把tensorflow_gpu的版本降到1.12.0,我使用的是python3.7,输入指令进行安装:
pip install tensorflow_gpu==1.12.0
提示没有对应版本的tensorflow_gpu与python3.7匹配安装,最低版本是tensorflow_gpu1.13.1版本,于是抱着试一试的心态进行安装,成功解决以上bug。
安装提示
清华镜像网站tensorflow_gpu版本这个网站里面有各种tensorflow_gpu的安装文件,下载速度值得一赞,从官网上下载很不稳定而且很慢,在镜像网站上下载体验感高多了。
从以上版本中选择合适配置的安装文件进行安装就好了。我安装的版本是tensorflow_gpu1.13.1版本,安装指令:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.13.1