TensorFlow - KeyError: "The name 'import/input' refers to an Operation not in the graph.

ErrorsRobotics

Hey everyone,

Just another small error I’ve run into while testing out Tensorflow’s label image example (Tensorflow/tensorflow/examples/image_retraining/label_image.py):

KeyError: "The name 'import/input' refers to an Operation not in the graph.

This one thankfully doesn’t seem to be my fault. In label_image.py change the following lines:

# Line 78-79
input_layer = "input"
output_layer = "InceptionV3/Predictions/Reshape_1"

# Change to this
input_layer = "Mul"
output_layer = "final_result"

Once that’s done just rerun your script and it should all work. Thanks to the following post for the solution: https://github.com/tensorflow/tensorflow/issues/12736

2 comments

Comments from the original blog are preserved here. New comments are closed.

  1. EddiePrebs

    Other errors, related to the same part of this script are still occurring. I posted a fix that worked for me on github:
    https://github.com/googlecodelabs/tensorflow-for-poets-2/issues/3

  2. Chris Owens
    In reply to EddiePrebs

    Thanks Eddie