码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2018-05-15 22:52:59      阅读:563      评论:0      收藏:0      [点我收藏+]

标签:nsf   cfs   dir   rtu   nfx   SQ   plt   i++   ace   

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。它只是几行代码而已。

技术分享图片

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

标签:nsf   cfs   dir   rtu   nfx   SQ   plt   i++   ace   

原文地址:https://www.cnblogs.com/2008nmj/p/9042772.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!