data_utils.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Face-Recognition 作者: aswl01 项目源码 文件源码
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')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号