import tensorflow as tf

    predict = tf.placeholder(tf.float32, shape=[hps.batch_size, 10])
    predict_nor, tsne_logit_nor = models(hps, image, FLAGS.RCE_train, logits=False, tsne_logits=True)
    predict_adv, tsne_logit_adv = models(hps, adv_image, FLAGS.RCE_train, logits=False, tsne_logits=True)

    # Calculate entropy
    argmax_y_onehot = tf.one_hot(tf.argmax(predict, 1), 10, on_value=0.0, off_value=1.0, axis=-1)
    normalized_y_nonmaximal = tf.reduce_sum(predict * argmax_y_onehot, 1)
    entropy = tf.reduce_sum(-tf.log(predict) * predict * argmax_y_onehot, 1) / normalized_y_nonmaximal + tf.log(
        normalized_y_nonmaximal)

    for k in range(10):
        adv_image_craft = adv_craft_func(hps, image, FLAGS.attack_method, eps=0.02 * k + 0.02, RCE_train=FLAGS.RCE_train)
        #adv_image_craft = adv_craft_func(hps, image, FLAGS.attack_method, eps=0.04,RCE_train=FLAGS.RCE_train)
        sess.run(tf.global_variables_initializer())
        saver.restore(sess, ckpt_state.model_checkpoint_path)

        for i in six.moves.range(FLAGS.eval_batch_count):
            time_start = time.time()
            (nor_img,true_label) = sess.run([images,labels])
            adv_img = sess.run(adv_image_craft,feed_dict={image:nor_img})

            # Local logits
            (predict_NOR, predict_ADV, logits_part_nor, logits_part_adv) = sess.run(
                [predict_nor, predict_adv, tsne_logit_nor, tsne_logit_adv],
                feed_dict={image: nor_img, adv_image: adv_img}
            )
