The implementation uses interpolative resizing, given the resize method
(specified by the interpolation argument). Use interpolation=nearest
to repeat the rows and columns of the data.
Int, or tuple of 2 integers.
The upsampling factors for rows and columns.
data_format
A string,
one of "channels_last" (default) or "channels_first".
The ordering of the dimensions in the inputs.
"channels_last" corresponds to inputs with shape
(batch_size, height, width, channels) while "channels_first"
corresponds to inputs with shape
(batch_size, channels, height, width).
When unspecified, uses
image_data_format value found in your Keras config file at
~/.keras/keras.json (if exists) else "channels_last".
Defaults to "channels_last".
interpolation
A string, one of "bicubic", "bilinear", "lanczos3",
"lanczos5", "nearest".
Input shape
4D tensor with shape:
If data_format is "channels_last":
(batch_size, rows, cols, channels)
If data_format is "channels_first":
(batch_size, channels, rows, cols)
Output shape
4D tensor with shape:
If data_format is "channels_last":
(batch_size, upsampled_rows, upsampled_cols, channels)
If data_format is "channels_first":
(batch_size, channels, upsampled_rows, upsampled_cols)
Attributes
input
Retrieves the input tensor(s) of a symbolic operation.
Only returns the tensor(s) corresponding to the first time
the operation was called.
output
Retrieves the output tensor(s) of a layer.
Only returns the tensor(s) corresponding to the first time
the operation was called.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-31 UTC."],[],[]]