cristian b
cristian b

Reputation: 61

What is input_layer in tensorflow (label_image)?

I am trying to use tensorflow to retrain a net. I think I did it correctly (I had the graph and labels).

Now I am using label_image.py to classify an image. This is the file: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/label_image/label_image.py

I call:

py label_image.py --image=test.jpg --graph=retrained_graph.pb --labels=retrained_labels.txt --input_layer=input --output_layer=final_result:0 --input_width=160 --input_height=120

but I have this error:

The name 'input' refers to an Operation not in the graph.

This is the graph I can see with tensorboard graph tensorboard

I see people saying: "use Mul/input/placeholder" and other stuff as parameter for "--input_layer=..." but none of them work for me.

i.e. tensorflow for poets: "The name 'import/input' refers to an Operation not in the graph."

And then I would like to understand what I'm doing...

The same thing maybe apply also for the output layer (I don't have error know, but maybe I will get when the first problem will be solved)

Any suggestion? Thanks

Upvotes: 1

Views: 1308

Answers (1)

cristian b
cristian b

Reputation: 61

So, after some research I used what I found here: https://stackoverflow.com/a/50620593/9419748

to output on monitor all the layers of the graph. In this way I was able to find the exact name of a suitable layer and passing the right name everything works.

Upvotes: 1

Related Questions