<p dir="auto">Source : <a href="https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/#4" rel="nofollow">tensorflow for poets</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Anujs-iMac:tensorflow-for-poets-2 anujchampjain$ python -m scripts.label_image     --graph=tf_files/retrained_graph.pb      --image=tf_files/flower_photos/daisy/21652746_cc379e0eea_m.jpg
2017-09-05 12:48:36.936100: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-05 12:48:36.936140: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-09-05 12:48:36.936144: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-05 12:48:36.936148: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Traceback (most recent call last):
  File &quot;/Users/anujchampjain/anaconda/lib/python3.6/runpy.py&quot;, line 193, in _run_module_as_main
    &quot;__main__&quot;, mod_spec)
  File &quot;/Users/anujchampjain/anaconda/lib/python3.6/runpy.py&quot;, line 85, in _run_code
    exec(code, run_globals)
  File &quot;/Users/anujchampjain/Desktop/Workspace/Tensorflow/tensorflow-for-poets-2/scripts/label_image.py&quot;, line 120, in &lt;module&gt;
    input_operation = graph.get_operation_by_name(input_name);
  File &quot;/Users/anujchampjain/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py&quot;, line 2836, in get_operation_by_name
    return self.as_graph_element(name, allow_tensor=False, allow_operation=True)
  File &quot;/Users/anujchampjain/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py&quot;, line 2708, in as_graph_element
    return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
  File &quot;/Users/anujchampjain/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py&quot;, line 2768, in _as_graph_element_locked
    &quot;graph.&quot; % repr(name))
KeyError: &quot;The name 'import/input' refers to an Operation not in the graph.&quot;"><pre class="notranslate"><code class="notranslate">Anujs-iMac:tensorflow-for-poets-2 anujchampjain$ python -m scripts.label_image     --graph=tf_files/retrained_graph.pb      --image=tf_files/flower_photos/daisy/21652746_cc379e0eea_m.jpg
2017-09-05 12:48:36.936100: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-05 12:48:36.936140: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-09-05 12:48:36.936144: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-05 12:48:36.936148: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Traceback (most recent call last):
  File "/Users/anujchampjain/anaconda/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/anujchampjain/anaconda/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/anujchampjain/Desktop/Workspace/Tensorflow/tensorflow-for-poets-2/scripts/label_image.py", line 120, in &lt;module&gt;
    input_operation = graph.get_operation_by_name(input_name);
  File "/Users/anujchampjain/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2836, in get_operation_by_name
    return self.as_graph_element(name, allow_tensor=False, allow_operation=True)
  File "/Users/anujchampjain/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2708, in as_graph_element
    return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
  File "/Users/anujchampjain/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2768, in _as_graph_element_locked
    "graph." % repr(name))
KeyError: "The name 'import/input' refers to an Operation not in the graph."
</code></pre></div>
<p dir="auto">Please go to Stack Overflow for help and support:</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/tagged/tensorflow" rel="nofollow">https://stackoverflow.com/questions/tagged/tensorflow</a></p>
<p dir="auto">If you open a GitHub issue, here is our policy:</p>
<ol dir="auto">
<li>It must be a bug or a feature request.</li>
<li>The form below must be filled out.</li>
<li>It shouldn't be a TensorBoard issue. Those go <a href="https://github.com/tensorflow/tensorboard/issues">here</a>.</li>
</ol>
<p dir="auto"><strong>Here's why we have that policy</strong>: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.</p>
<hr>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: No</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Windows 10 X64 Enterprise Edition</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: binary</li>
<li><strong>TensorFlow version (use command below)</strong>: 1.3</li>
<li><strong>Python version</strong>: Anaconda 4.4.0 Python 3.6.2</li>
<li><strong>Bazel version (if compiling from source)</strong>: no</li>
<li><strong>CUDA/cuDNN version</strong>: No</li>
<li><strong>GPU model and memory</strong>: No</li>
<li><strong>Exact command to reproduce</strong>:<br>
(tensorflow13) C:\Users\James\Tensorflow\model-retrain\tensorflow-for-poets-2\scripts&gt;python .\label_image.py --image c:\Users\James\Tensorflow\sample_img\Panda001.jpg --graph c:\Users\James\Tensorflow\model-retrain\tensorflow-for-poets-2\scripts\retrained_graph.pb --labels C:\Users\James\Tensorflow\model-retrain\tensorflow-for-poets-2\scripts\retrained_labels.txt</li>
</ul>
<p dir="auto">You can collect some of this information using our environment capture script:</p>
<p dir="auto"><a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh</a></p>
<p dir="auto">You can obtain the TensorFlow version with</p>
<p dir="auto">python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</p>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.</p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto">Error Log:<br>
2017-09-01 09:27:46.902115: I C:\tf_jenkins\home\workspace\nightly-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2<br>
Traceback (most recent call last):<br>
File ".\label_image.py", line 120, in <br>
input_operation = graph.get_operation_by_name(input_name);<br>
File "C:\Users\James\AppData\Local\conda\conda\envs\tensorflow13\lib\site-packages\tensorflow\python\framework\ops.py", line 3225, in get_operation_by_name<br>
return self.as_graph_element(name, allow_tensor=False, allow_operation=True)<br>
File "C:\Users\James\AppData\Local\conda\conda\envs\tensorflow13\lib\site-packages\tensorflow\python\framework\ops.py", line 3097, in as_graph_element<br>
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)<br>
File "C:\Users\James\AppData\Local\conda\conda\envs\tensorflow13\lib\site-packages\tensorflow\python\framework\ops.py", line 3157, in _as_graph_element_locked<br>
"graph." % repr(name))<br>
KeyError: "The name 'import/input' refers to an Operation not in the graph."</p>