import tensorflow as tf

            #Local logits
            (predict_ADV,logits_part_adv) = sess.run(
                [predict_adv, tsne_logit_adv],feed_dict={adv_image:adv_img}
            )

            #Local entropy and confidence for nor_img
            (entropy_test_nor_help,labels_nor_help,confidence_test_nor_help) = sess.run(
                [entropy,tf.argmax(predict,axis=1),tf.reduce_max(predict, axis=1)],feed_dict={predict:predict_NOR}
            )

            # Local entropy and confidence for adv_img
            (entropy_test_adv_help, labels_adv_help, confidence_test_adv_help) = sess.run(
                [entropy, tf.argmax(predict, axis=1), tf.reduce_max(predict, axis=1)], feed_dict={predict: predict_ADV}
            )

            if FLAGS.attack_method == 'carliniL2_specific' or FLAGS.attack_method == 'carliniL2_highden':
                print('Log-density-ratio in attacking function of nor/adv is %f'%np.sum(log_density_ratio))
                m_tsne_logits_adv = (copy.copy(logits_part_adv)).reshape((1, 64))
                m_tsne_logits_adv = np.repeat(m_tsne_logits_adv,100,axis=0)
                kernel_train = (copy.copy(e_kernel_train[:,:,np.argmax(target_lab)])).reshape((100,64))
                log_density_ratio2 = -np.log(1e-30+np.mean(np.exp(-np.sum(np.square(m_tsne_logits_adv
                                                                      - kernel_train), axis=1) / sigma2),
                                      axis=0)) + np.log(e_median[np.argmax(target_lab)])
                # m_tsne_logits_adv = (copy.copy(logits_part_adv-e_mean[np.argmax(target_lab)])).reshape((64,1))
