A preprocessing layer which resizes images.
View aliases
Main aliases
tf.keras.layers.experimental.preprocessing.Resizing
See Migration guide for more details.
tf.compat.v1.keras.layers.Resizing
, tf.compat.v1.keras.layers.experimental.preprocessing.Resizing
tf.keras.layers.Resizing(
height,
width,
interpolation='bilinear',
crop_to_aspect_ratio=False,
**kwargs
)
This layer resizes an image input to a target height and width. The input
should be a 4D (batched) or 3D (unbatched) tensor in "channels_last"
format.
Input pixel values can be of any range (e.g. [0., 1.)
or [0, 255]
) and of
interger or floating point dtype. By default, the layer will output floats.
For an overview and full list of preprocessing layers, see the preprocessing guide.