TensorFlow – KeyError: “The name ‘import/input’ refers to an Operation not in the graph.

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


Posted

in

,

by

Comments

2 responses to “TensorFlow – KeyError: “The name ‘import/input’ refers to an Operation not in the graph.”

  1. EddiePrebs Avatar
    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

    Like

    1. Chris Owens Avatar
      Chris Owens

      Thanks Eddie

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

%d bloggers like this: