1

For labelling objects,

If I use TensorFlow's label_image.py like:

    $ python label_image.py --image=1.jpg --graph=output_inference_graph.pb/frozen_inference_graph.pb --labels=test.txt

Error: KeyError: "The name 'final_result:0' refers to a Tensor which does not exist. The operation, 'final_result', does not exist in the graph."

Reference link:https://github.com/tensorflow/tensorflow/blob/r1.3/tensorflow/examples/image_retraining/label_image.py

Nayeem
  • 91
  • 14

1 Answers1

1

You are missing output layer parameter which you have use during your training. Try

`bazel-bin/tensorflow/examples/image_retraining/label_image \
--graph=/tmp/your_output_graph.pb 
--labels=/tmp/your_output_labels.txt \
--output_layer=final_result:0 \
--image=path_to_your_imahe.jpg`
Muhammad Hannan
  • 2,389
  • 19
  • 28
  • thats hard coded into application, Yes I am using `--output_layer=final_result:0` parameter – Nayeem Oct 27 '17 at 09:23