tfm.vision.spatial_transform_ops.bilinear_resize_with_pad

Bilinear resizes the images, then pads to output size.

images A tensor in shape (batch_size, input_h, input_w, ...) with arbitrary numbers of channel dimensions.
rescale_size An int tensor in shape (2,) or (batch_size, 2), representing the sizes of the rescaled images.
output_size The size of the output image in (output_h, output_w).

A tensor in shape (batch_size, output_h, output_w, ...). The result has the same dtype as the input if it's float32, float16, bfloat16, otherwise the result is float32.