While running TensorFlow’s classify_ image, getting AttributeError: ‘module’ object has no attribute ‘gfile’
When you run tensorflow’s classify_ Image, the error prompt “attributeerror: ‘module’ object has no attribute ‘gfile'”
Problem Description:
I got an error. When I run tensorflow sample file, under 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.
I’ve tried installing both methods, from pip to source, at virtualserver, etc., but still get this error.
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