title: How to get model output from tensorflow model without knowing its name in advance?
body: <p>So I frequently run models with different architectures, but have code intended to apply to all of them which runs inference off the saved models.  Thus, I will be calling <code>eval()</code> on the last layer of this model, like this:</p>
  
  <pre><code>yhat = graph.get_tensor_by_name("name_of_my_last_layer:0")
  decoded_image = yhat.eval(session=sess, feed_dict={x : X})
  </code></pre>
  
  <p>However, without arduous log parsing, I don't know exactly what the last layer is named, and I'm currently hand-coding it.  I've considered creating a generic 'output' tensor in my graph but that seems wasteful/brittle.  What is the better way?</p>