title: How to make predictions with tf.estimator.Estimator from checkpoint?
body: <p>I just trained a CNN to recognise sunspots with tensorflow. My model is pretty much the same as <a href="https://www.tensorflow.org/tutorials/layers" rel="noreferrer">this</a>. 
  The problem is that I cannot find anywhere a clear explanation on how to make predictions with the checkpoint generated by the training phase. </p>
  
  <p>Tried using the standard restore method:</p>
  
  <pre><code>saver = tf.train.import_meta_graph('./model/model.ckpt.meta')
  saver.restore(sess,'./model/model.ckpt')
  </code></pre>
  
  <p>but then I cannot figure out how to run it.<br>
  Tried using <code>tf.estimator.Estimator.predict()</code> like this:</p>
  
  <pre><code># Create the Estimator (should reload the last checkpoint but it doesn't)
  sunspot_classifier = tf.estimator.Estimator(
      model_fn=cnn_model_fn, model_dir="./model")
  
  # Set up logging for predictions
  # Log the values in the "Softmax" tensor with label "probabilities"
  tensors_to_log = {"probabilities": "softmax_tensor"}
  logging_hook = tf.train.LoggingTensorHook(
      tensors=tensors_to_log, every_n_iter=50)
  
  # predict with the model and print results
  pred_input_fn = tf.estimator.inputs.numpy_input_fn(
      x={"x": pred_data},
      shuffle=False)
  pred_results = sunspot_classifier.predict(input_fn=pred_input_fn)
  print(pred_results)
  </code></pre>
  
  <p>but what it does is spitting out <code>&lt;generator object Estimator.predict at 0x10dda6bf8&gt;</code>. 
  While if I use the same code but with <code>tf.estimator.Estimator.evaluate()</code> it works like a charm (reloads the model, performs evaluation and sends it to TensorBoard). </p>
  
  <p>I know there are many similar questions but I couldn't really find the way that worked for me.</p>