title: How to serve retrained Inception model using Tensorflow Serving?
body: <p>So I have trained inception model to recognize flowers according to this guide. <a href="https://www.tensorflow.org/versions/r0.8/how_tos/image_retraining/index.html" rel="noreferrer">https://www.tensorflow.org/versions/r0.8/how_tos/image_retraining/index.html</a></p>
  
  <pre><code>bazel build tensorflow/examples/image_retraining:retrain
  bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir ~/flower_photos
  </code></pre>
  
  <p>To classify the image via command line, I can do this:</p>
  
  <pre><code>bazel build tensorflow/examples/label_image:label_image &amp;&amp; \
  bazel-bin/tensorflow/examples/label_image/label_image \
  --graph=/tmp/output_graph.pb --labels=/tmp/output_labels.txt \
  --output_layer=final_result \
  --image=$HOME/flower_photos/daisy/21652746_cc379e0eea_m.jpg
  </code></pre>
  
  <p>But how do I serve this graph via Tensorflow serving?</p>
  
  <p>The guide about setting up Tensorflow serving (<a href="https://tensorflow.github.io/serving/serving_basic" rel="noreferrer">https://tensorflow.github.io/serving/serving_basic</a>) does not tell how to incorporate the graph (output_graph.pb). The server expects the different format of file:</p>
  
  <pre><code>$&gt;ls /tmp/mnist_model/00000001
  checkpoint export-00000-of-00001 export.meta
  </code></pre>