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

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

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

问题描述:post

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

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

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

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

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

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

 

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 Bulatovget

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

相关文章
相关标签/搜索