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

相關文章
相關標籤/搜索