keras-team/keras · error · ValueError
`slice` operation requires tuple for `shape` with the openvi
Error message
`slice` operation requires tuple for `shape` with the openvino backend. Received: shape={shape} What it means
Error "`slice` operation requires tuple for `shape` with the openvino backend. Received: shape={shape}" thrown in keras-team/keras.
Source
Thrown at keras/src/backend/openvino/core.py:1368
result = ov_opset.scatter_nd_update(
inputs, indices, updates, reduction=ov_reduction
).output(0)
return OpenVINOKerasTensor(result)
def slice(inputs, start_indices, shape):
inputs = get_ov_output(inputs)
if isinstance(start_indices, (list, np.ndarray)):
start_indices = tuple(start_indices)
if isinstance(shape, (list, np.ndarray)):
shape = tuple(shape)
if not isinstance(start_indices, tuple):
raise ValueError(
"`slice` operation requires tuple for `start_indices with the "
f"openvino backend. Received: start_indices={start_indices}"
)
if not isinstance(shape, tuple):
raise ValueError(
"`slice` operation requires tuple for `shape` with the "
f"openvino backend. Received: shape={shape}"
)
axes = []
start = []
stop = []
def prepare_slice_index(val):
val_type = val.get_element_type()
if not val_type.is_integral():
raise ValueError(
"`slice` is not supported by OpenVINO backend "
"for `start_indices` or `shape` with non-integer types"
)
if val_type != Type.i32:
val = ov_opset.convert(val, Type.i32).output(0)
if len(val.get_partial_shape()) == 0:View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/backend/openvino/core.py:1368 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/af31183d630e31fd.
Report an issue: GitHub.