def read_images_from_disk(input_queue):
"""Consumes a single filename and label as a ' '-delimited string.
Args:
filename_and_label_tensor: A scalar string tensor.
Returns:
Two tensors: the decoded image, and the string label.
"""
label = input_queue[1]
file_contents = tf.read_file(input_queue[0])
example = tf.image.decode_png(file_contents, channels=3)
return example, label
# def random_rotate_image(image):
# angle = np.random.uniform(low=-10.0, high=10.0)
# return misc.imrotate(image, angle, 'bicubic')
评论列表
文章目录