import tensorflow as tf

            eval_metrics=(eval_metrics_fn, logits),
            loss=loss)
      else:
        return tf.contrib.tpu.TPUEstimatorSpec(
            tf.estimator.ModeKeys.EVAL,
            eval_metrics=(eval_metrics_fn, [logits, labels]),
