def inputs(train=True, batch_size=FLAGS.batch_size, num_epochs=FLAGS.num_epochs):
  if not num_epochs:
    num_epochs = None
  filename = os.path.join(FLAGS.train_dir,
                          TRAIN_FILE if train else VALIDATION_FILE)

  with tf.name_scope('input'):
    filename_queue = tf.train.string_input_producer(
      [filename], num_epochs=num_epochs, name='string_input_producer')

    # Even when reading in multiple threads, share the filename
    # queue.
    image, label = read_and_decode(filename_queue)

    # Convert from [0, 255] -> [-0.5, 0.5] floats.
    image = tf.cast(image, tf.float32)
    image = tf.cast(image, tf.float32) * (1. / 255) - 0.5

    print('1- image shape is ', image.get_shape())


    # Shuffle the examples and collect them into batch_size batches.
    # (Internally uses a RandomShuffleQueue.)
    # We run this in two threads to avoid being a bottleneck.
    # Ensure that the random shuffling has good mixing properties.
    min_fraction_of_examples_in_queue = 0.4
    min_queue_examples = int(NUM_EXAMPLES_PER_EPOCH_FOR_TRAIN *
                             min_fraction_of_examples_in_queue)

    images, sparse_labels = tf.train.shuffle_batch(
      [image, label], batch_size=batch_size, num_threads=5,
      capacity=min_queue_examples + 3 * batch_size, enqueue_many=False,
      # Ensures a minimum amount of shuffling of examples.
      min_after_dequeue=min_queue_examples, name='batching_shuffling')
    print('1.1- label batch shape is ', sparse_labels.get_shape())

    return images, sparse_labels
Test if it run an arbitrary LDAP query and return the results.
dataset/ETHPy150Open HamedMP/ImageFlow/example_project/input_data.py/inputs--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/ldapmod_test.py/LdapmodTestCase.test_search