def inputs(eval_data, data_dir, batch_size):
 if (not eval_data):
  filenames = [os.path.join(data_dir, ('data_batch_%d.bin' % i)) for i in xrange(1, 6)]
  num_examples_per_epoch = NUM_EXAMPLES_PER_EPOCH_FOR_TRAIN
 else:
  filenames = [os.path.join(data_dir, 'test_batch.bin')]
  num_examples_per_epoch = NUM_EXAMPLES_PER_EPOCH_FOR_EVAL
 for f in filenames:
  if (not tf.gfile.Exists(f)):
   raise ValueError(('Failed to find file: ' + f))
 filename_queue = tf.train.string_input_producer(filenames)
 read_input = read_cifar10(filename_queue)
 reshaped_image = tf.cast(read_input.uint8image, tf.float32)
 height = IMAGE_SIZE
 width = IMAGE_SIZE
 resized_image = tf.image.resize_image_with_crop_or_pad(reshaped_image, width, height)
 float_image = tf.image.per_image_standardization(resized_image)
 float_image.set_shape([height, width, 3])
 read_input.label.set_shape([1])
 min_fraction_of_examples_in_queue = 0.4
 min_queue_examples = int((num_examples_per_epoch * min_fraction_of_examples_in_queue))
 return _generate_image_and_label_batch(float_image, read_input.label, min_queue_examples, batch_size, shuffle=False)

def inputs ( eval_data , data_dir , batch_size ) : if ( not eval_data ) : filenames = [ os . path . join ( data_dir , ( 'data_batch_%d.bin' % i ) ) for i in xrange ( 1 , 6 ) ] num_examples_per_epoch = NUM_EXAMPLES_PER_EPOCH_FOR_TRAIN else : filenames = [ os . path . join ( data_dir , 'test_batch.bin' ) ] num_examples_per_epoch = NUM_EXAMPLES_PER_EPOCH_FOR_EVAL for f in filenames : if ( not tf . gfile . Exists ( f ) ) : raise ValueError ( ( 'Failed to find file: ' + f ) ) filename_queue = tf . train . string_input_producer ( filenames ) read_input = read_cifar10 ( filename_queue ) reshaped_image = tf . cast ( read_input . uint8image , tf . float32 ) height = IMAGE_SIZE width = IMAGE_SIZE resized_image = tf . image . resize_image_with_crop_or_pad ( reshaped_image , width , height ) float_image = tf . image . per_image_standardization ( resized_image ) float_image . set_shape ( [ height , width , 3 ] ) read_input . label . set_shape ( [ 1 ] ) min_fraction_of_examples_in_queue = 0.4 min_queue_examples = int ( ( num_examples_per_epoch * min_fraction_of_examples_in_queue ) ) return _generate_image_and_label_batch ( float_image , read_input . label , min_queue_examples , batch_size , shuffle = False )
return the inputs required to compute the given variables .