def parse_bounding_box(height, width, image_float, box):
    """Decodes an image, resizes and scales RGB values to be in [0, 1]."""
    image_bbox = tf.image.crop_to_bounding_box(
        image_float,
        offset_height=box[0],
        offset_width=box[1],
        target_height=box[2],
        target_width=box[3])
    image_resized = tf.image.resize_image_with_pad(image_bbox, height, width)
    image = tf.reshape(image_resized, [height, width, 3])
    return image
Decodes an image, resizes and scales RGB values to be in [0, 1].
language/question_answering/b2t2/run_b2t2.py