AttributeError: 'module' object has no attribute 'gfile'


While running TensorFlow's classify_image, getting AttributeError: 'module' object has no attribute 'gfile'

当运行TensorFlow的classify_image时,得到错误提示“AttributeError: 'module' object has no attribute 'gfile'”。

问题描述:

我得到一个错误,当我运行TensorFlow样例文件时,在imagenet model下,

I am getting this error while running the sample file given with TensorFlow, in the imagenet model,

File "classify_image.py", line 154, in run_inference_on_image
if not tf.gfile.Exists(image):

AttributeError: 'module' object has no attribute 'gfile'

I have tried installing using both, from pip as well as source, on virtualserver as well, still I get this error.

我已经尝试安装两个方法了,从pip到source,在virtualserver等等,但是还是得到这个错误。

 

This gfile stuff was added 6 days ago in this commit -- github.com/tensorflow/tensorflow/commit/… , might be worth filing an issue on github. As a workaround, you can undo the gfile stuff locally back into os.path, it's only a few lines – Yaroslav Bulatov

这个gfile的东西是在6天前加上去的,看这个评论,github.com/tensorflow/tensorflow/commit/…,或许值得在github上添加一个issue。作为一种解决方案,你可以本地撤销gfile东西回到os.path。它只是几行代码而已。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM