Resize images to size using the specified method.

Used in the notebooks

Used in the guide Used in the tutorials

Resized images will be distorted if their original aspect ratio is not the same as size. To avoid distortions see tf.image.resize_with_pad.

image = tf.constant([
# Add "batch" and "channels" dimensions
image = image[tf.newaxis, ..., tf.newaxis]