I am trying to do the Tensorflow for Poets tutorial and I am on step 6 which is using the retrained model. I am trying to run this command:
python -m scripts.label_image --graph=tf_files/retrained_graph.pb -- image=tf_files/flower_photos/daisy/21652746_cc379e0eea_m.jpg
and this error is returned:
2019-03-06 16:13:27.270248: I Tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Traceback (most recent call last):
File "C:\Users\rzara\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\rzara\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\rzara\Documents\GitHub\tensorflow-for-poets- 2\scripts\label_image.py", line 121, in <module>
input_operation = graph.get_operation_by_name(input_name);
File "C:\Users\rzara\AppData\Local\Programs\Python\Python37\lib\site- packages\tensorflow\python\framework\ops.py", line 3606, in get_operation_by_name
return self.as_graph_element(name, allow_tensor=False, allow_operation=True)
File "C:\Users\rzara\AppData\Local\Programs\Python\Python37\lib\site- packages\tensorflow\python\framework\ops.py", line 3478, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "C:\Users\rzara\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\ops.py", line 3538, in
_as_graph_element_locked
"graph." % repr(name))
**KeyError: "The name 'import/Mul' refers to an Operation not in the graph."**
I have already tried to open label_image.py and change:
input_height = 299
input_width = 299
input_layer = 'Mul'
but it still does not run. Please help. I have already checked another post on here but it did not help: tensorflow for poets: "The name 'import/input' refers to an Operation not in the graph."