import tensorflow as tf

                    eval_metrics=eval_metrics,
                    scaffold_fn=scaffold_fn,
                )
            else:
                output_spec = tf.estimator.EstimatorSpec(mode=mode, loss=total_loss)
        else:
            raise ValueError("Only TRAIN and EVAL modes are supported: %s" % (mode))

