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

转载于:https://www.cnblogs.com/2008nmj/p/9042772.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值