import tensorflow as tf

    #Construct graph
    images, labels = input_name.build_input(
        FLAGS.dataset, FLAGS.eval_data_path, hps.batch_size, FLAGS.mode)#FLAGS.mode='attack', batch_size=200
    Res = model_name.ResNet(hps, images, FLAGS.mode, Reuse=False)
    Res.build_graph()
    saver = tf.train.Saver()

    #Open session and restore checkpoint
    sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True))
    tf.train.start_queue_runners(sess)

    ckpt_state = tf.train.get_checkpoint_state(FLAGS.log_root)  # Choose dir according to rt
    tf.logging.info('Loading checkpoint %s', ckpt_state.model_checkpoint_path)

    num_sample = hps.batch_size*FLAGS.eval_batch_count

    # Initialize results to save
    entropy_test_adv_all = np.array([])
    confidence_test_adv_all = np.array([])
    entropy_test_nor_all = np.array([])
    confidence_test_nor_all = np.array([])
    logits_adv_all = np.reshape(np.array([]), (0, 64))
