3

I am trying to fine tune inception_v3 model for reduced number of custom classes. I followed example script finetune_inception_v3_on_flowers.sh to retrain the model. Retraining script generated list of .data, .meta and .index files. I am also able to generate .pb file out of these checkpoint files using freeze_graph utility.

I used following command to freeze graph

bazel-bin/tensorflow/python/tools/freeze_graph --input_graph=/home/training/tmp/inception_v3/graph.pbtxt --input_checkpoint=/home/training/tmp/inception_v3/model.ckpt-1000 --input_binary=false --output_graph=/home/training/frozen_inception_v3.pb --output_node_names=InceptionV3/Predictions/Reshape_1

Everything seems to be fine until I tried to test my model using label_image utility. Retrained model doesn't seem to have input layer, label_image utility is giving me following error,

2018-02-14 17:22:31.253014: E tensorflow/examples/label_image/main.cc:349] Running model failed: Not found: FeedInputs: unable to find feed output input

summarize_graph output confirmed the same, output of it is,

No inputs spotted.
No variables spotted.
Found 1 possible outputs: (name=InceptionV3/Predictions/Reshape_1, op=Reshape)
Found 21992543 (21.99M) const parameters, 0 (0) variable parameters, and 0 control_edges
Op types used: 493 Const, 190 Identity, 95 Conv2D, 94 Relu, 94 FusedBatchNorm, 15 ConcatV2, 10 AvgPool, 4 MaxPool, 2 Add, 2 Mul, 2 Reshape, 1 Floor, 1 FIFOQueueV2, 1 QueueDequeueV2, 1 RandomUniform, 1 RealDiv, 1 BiasAdd, 1 Softmax, 1 Squeeze, 1 Sub

I came across similar question but I am not very clear about the solution suggested. I am very new to ML and tensorflow, and I am unable to post comments to the original question as well. I am not sure where can I add input layer so that I can run label_image on the generated pb file. Any help or pointers are very much appreciated. Thank you.

pragnesh
  • 1,240
  • 7
  • 18

0 Answers0