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'”
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
- Tensorflow reported an error when using session module: attributeerror: module ‘tensorflow’ has no attribute ‘session’, which has been solved
- ‘tensorflow‘ has no attribute ‘sub‘ [How to Solve]
- [Solved] Python TensorFlow Error: ‘tensorflow.compat.v2.__internal__’ has no attribute ‘tf2’
- docker：ImportError: libcuda.so.1: cannot open shared object file: No such file or directory
- AttributeError: module ‘tensorflow’ has no attribute ‘Session’
- ModuleNotFoundError: No module named ‘_pywrap_tensorflow_internal’ [How to Solve]
- How to Solve Error: Failed to load the native TensorFlow runtime.
- AttributeError: ‘module’ object has no attribute ‘main’
- [Solved] ImportError: No module named tensorflow
- ImportError: DLL load failed: The specified module could not be found