keras-team/keras · error · ValueError
Invalid value for argument `fill_mode`. Expected one of {fil
Error message
Invalid value for argument `fill_mode`. Expected one of {fill_modes}. Received: fill_mode={fill_mode} What it means
Error "Invalid value for argument `fill_mode`. Expected one of {fill_modes}. Received: fill_mode={fill_mode}" thrown in keras-team/keras.
Source
Thrown at keras/src/backend/openvino/image.py:1272
"""size_node: OV i32 scalar node."""
# floor_divide(_mirror(2*index + 1, 2*size + 1) - 1, 2)
two_c = ov_opset.constant(2, dtype=Type.i32).output(0)
one_c = ov_opset.constant(1, dtype=Type.i32).output(0)
idx2 = ov_opset.add(ov_opset.multiply(two_c, index), one_c).output(0)
size2_plus1 = ov_opset.add(
ov_opset.multiply(two_c, size_node), one_c
).output(0)
mirrored = _mirror_index_fixer(idx2, size2_plus1)
# integer divide by 2 (result is always >= 0, so truncated == floor)
return ov_opset.divide(ov_opset.subtract(mirrored, one_c), two_c).output(0)
def map_coordinates(
inputs, coordinates, order, fill_mode="constant", fill_value=0
):
fill_modes = {"constant", "nearest", "wrap", "mirror", "reflect"}
if fill_mode not in fill_modes:
raise ValueError(
"Invalid value for argument `fill_mode`. Expected one of "
f"{fill_modes}. Received: fill_mode={fill_mode}"
)
if order not in (0, 1):
raise ValueError(
"Invalid value for argument `order`. Expected one of "
f"[0, 1]. Received: order={order}"
)
inputs = convert_to_tensor(inputs)
coordinates = convert_to_tensor(coordinates)
inputs_ov = get_ov_output(inputs)
coords_ov = get_ov_output(coordinates)
input_shape = inputs_ov.get_partial_shape()
ndim = input_shape.rank.get_length()
coords_shape = coords_ov.get_partial_shape()
if coords_shape.rank.is_static and coords_shape.rank.get_length() < 2:
raise ValueError(View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/backend/openvino/image.py:1272 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/19f1cdd81f75eb7d.
Report an issue: GitHub.