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/…
AttributeError: 'module' object has no attribute 'gfile'