title: how to load and use a saved model on tensorflow?
body: <p>I have found 2 ways to save a model in Tensorflow: <code>tf.train.Saver()</code> and <code>SavedModelBuilder</code>. However, <strong>I can't find documentation on using the model</strong> after it being loaded  the second way.</p>
  
  <p>Note: I want to use <code>SavedModelBuilder</code> way because I train the model in Python and will use it at serving time in another language (Go), and it seems that <code>SavedModelBuilder</code> is the only way in that case.</p>
  
  <p>This works great with <code>tf.train.Saver()</code> (first way):</p>
  
  <pre><code>model = tf.add(W * x, b, name="finalnode")
  
  # save
  saver = tf.train.Saver()
  saver.save(sess, "/tmp/model")
  
  # load
  saver.restore(sess, "/tmp/model")
  
  # IMPORTANT PART: REALLY USING THE MODEL AFTER LOADING IT
  # I CAN'T FIND AN EQUIVALENT OF THIS PART IN THE OTHER WAY.
  
  model = graph.get_tensor_by_name("finalnode:0")
  sess.run(model, {x: [5, 6, 7]})
  </code></pre>
  
  <p><code>tf.saved_model.builder.SavedModelBuilder()</code> is defined in the <a href="https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python/saved_model/" rel="noreferrer">Readme</a>  but after loading the model with <code>tf.saved_model.loader.load(sess, [], export_dir)</code>), I can't find documentation on getting back at the nodes (see <code>"finalnode"</code> in the code above)</p>