def get_read_input(eval_data=False):
"""
Fetch input data row by row from CSV files.
Args:
eval_data: Bool representing whether to read from train or test directories.
Returns:
read_input: An object representing a single example.
reshaped_image: Image of type tf.float32, reshaped to correct dimensions.
"""
# Create queues that produce the filenames and labels to read.
pref = 'test' if eval_data else 'train'
all_files_queue = tf.train.string_input_producer([pref + '.csv'])
# Read examples from files in the filename queue.
read_input = read_bbbc006(all_files_queue)
reshaped_image = tf.cast(read_input.uint8image, tf.float32)
read_input.label = tf.cast(read_input.label, tf.int32)
return read_input, reshaped_image
评论列表
文章目录