keras-team/keras · error · ValueError
`interpolation` argument should be one of: "{interploations_
Error message
`interpolation` argument should be one of: "{interploations_list}. Received: "{interpolation}". What it means
Error "`interpolation` argument should be one of: "{interploations_list}. Received: "{interpolation}"." thrown in keras-team/keras.
Source
Thrown at keras/src/legacy/backend.py:1384
)
if data_format == "channels_first":
x = permute_dimensions(x, [0, 2, 3, 1])
interpolations = {
"area": tf.image.ResizeMethod.AREA,
"bicubic": tf.image.ResizeMethod.BICUBIC,
"bilinear": tf.image.ResizeMethod.BILINEAR,
"gaussian": tf.image.ResizeMethod.GAUSSIAN,
"lanczos3": tf.image.ResizeMethod.LANCZOS3,
"lanczos5": tf.image.ResizeMethod.LANCZOS5,
"mitchellcubic": tf.image.ResizeMethod.MITCHELLCUBIC,
"nearest": tf.image.ResizeMethod.NEAREST_NEIGHBOR,
}
interploations_list = '"' + '", "'.join(interpolations.keys()) + '"'
if interpolation in interpolations:
x = tf.image.resize(x, new_shape, method=interpolations[interpolation])
else:
raise ValueError(
"`interpolation` argument should be one of: "
f'{interploations_list}. Received: "{interpolation}".'
)
if data_format == "channels_first":
x = permute_dimensions(x, [0, 3, 1, 2])
return x
@keras_export("keras._legacy.backend.resize_volumes")
def resize_volumes(x, depth_factor, height_factor, width_factor, data_format):
"""DEPRECATED."""
if data_format == "channels_first":
output = repeat_elements(x, depth_factor, axis=2)
output = repeat_elements(output, height_factor, axis=3)
output = repeat_elements(output, width_factor, axis=4)
return output
elif data_format == "channels_last":View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/legacy/backend.py:1384 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25).
Data as JSON: /api/errors/22f13eb87ef2a2fb.
Report an issue: GitHub.