import tensorflow as tf

        elif mode == tf.estimator.ModeKeys.EVAL:

            def metric_fn(per_example_loss, label_ids, logits, is_real_example):
                # predictions = tf.argmax(logits, axis=-1, output_type=tf.int32)
                # ones=tf.get_variable('ones',shape=logits.shape,initializer=tf.ones_initializer)
                # zeros=tf.get_variable('zeros',shape=logits.shape,initializer=tf.zeros_initializer)
                predictions=tf.where(logits>=0,tf.ones(tf.shape(logits)),tf.zeros(tf.shape(logits)))
                accuracy = tf.metrics.accuracy(
                    labels=label_ids, predictions=predictions, weights=is_real_example)
                loss = tf.metrics.mean(values=per_example_loss, weights=is_real_example)
                return {
                    "eval_accuracy": accuracy,
                    "eval_loss": loss,
                }
