import tensorflow as tf

    predict = tf.placeholder(tf.float32,shape=[hps.batch_size, 10])
    logit_nor,tsne_logit_nor = model_carlini_adv.predict(image,tsne_logits=True)
    logit_adv,tsne_logit_adv = model_carlini_adv.predict(adv_image,tsne_logits=True)
    predict_nor = tf.nn.softmax(logit_nor)
    predict_adv = tf.nn.softmax(logit_adv)

    # 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(1):
        result_dict = loadmat('kernel_para_'+FLAGS.dataset+'/kernel1000_for_attack_' + f1 + '.mat')
        result_dict_median = loadmat('kernel_para_'+FLAGS.dataset+'/kernel1000_median_for_attack_' + f1 + '.mat')
