title: TensorFlow custom estimator stuck when calling evaluate after training
body: <p>I made a custom estimator (see this <a href="https://colab.research.google.com/drive/10VKcE1sZh8F2-HYASxx7OgV8Mf4DQKFy" rel="nofollow noreferrer">colab</a>) in TensorFlow (v1.10) based on their <a href="https://www.tensorflow.org/guide/custom_estimators" rel="nofollow noreferrer">guide</a>.</p>
  
  <p>I trained the toy model with:</p>
  
  <pre><code>tf.estimator.train_and_evaluate(est, train_spec, eval_spec)
  </code></pre>
  
  <p>and then, with some test set data, try to evaluate the model with:</p>
  
  <pre><code>test_fn = lambda: input_fn(DATASET['test'], run_params)
  test_res = est.evaluate(input_fn=test_fn)
  </code></pre>
  
  <p>(where the <code>train_fn</code> and <code>valid_fn</code> are functionally identical to <code>test_fn</code>, e.g. sufficient for <code>tf.estimator.train_and_evaluate</code> to work).</p>
  
  <p>I would expect something to happen, however this is what I get:</p>
  
  <pre><code>INFO:tensorflow:Calling model_fn.
  INFO:tensorflow:Done calling model_fn.
  INFO:tensorflow:Starting evaluation at 2018-11-09-13:38:44
  INFO:tensorflow:Graph was finalized.
  INFO:tensorflow:Restoring parameters from ./test/model.ckpt-100
  INFO:tensorflow:Running local_init_op.
  INFO:tensorflow:Done running local_init_op.
  </code></pre>
  
  <p>and then it just runs forever.</p>
  
  <p>How come?</p>