keras-team/keras · error · ValueError
`slice_update` requires integral start_indices
Error message
`slice_update` requires integral start_indices
What it means
Raised by the OpenVINO backend slice_update op when an entry of start_indices is a non-integer constant. Slice offsets must be integral, so the element-type check on each index rejects floating or non-numeric values.
Solutions
- Use integer values for every start index
- Cast computed start indices with int() before calling slice_update
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at keras/src/backend/openvino/core.py:1445 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/d57a152731a233fe.
Report an issue: GitHub.
Appendix: source
Thrown at keras/src/backend/openvino/core.py:1445
if isinstance(start_indices, (list, np.ndarray)):
start_indices = tuple(start_indices)
if not isinstance(start_indices, tuple):
raise ValueError(
"`slice_update` is not supported by openvino backend"
" for `start_indices` of type {}".format(type(start_indices))
)
zero_scalar = ov_opset.constant(0, Type.i32)
one_scalar = ov_opset.constant(1, Type.i32)
zero_tensor = ov_opset.constant([0], Type.i32)
one_tensor = ov_opset.constant([1], Type.i32)
processed_start_indices = []
for idx in start_indices:
val = get_ov_output(idx)
if not val.get_element_type().is_integral():
raise ValueError("`slice_update` requires integral start_indices")
if val.get_element_type() != Type.i32:
val = ov_opset.convert(val, Type.i32).output(0)
if val.get_partial_shape().rank.get_length() == 0:
val = ov_opset.unsqueeze(val, zero_scalar).output(0)
processed_start_indices.append(val)
updates_shape = ov_opset.shape_of(updates_tensor, Type.i32).output(0)
rank = updates_tensor.get_partial_shape().rank.get_length()
if rank == 0:
# Handle scalar update
start_tensor = ov_opset.concat(processed_start_indices, axis=0).output(
0
)
# For scatter_nd_update,
# indices should be of shape [num_updates, rank_of_inputs]
# and updates should be of shape [num_updates]. Here num_updates is 1.
absolute_indices = ov_opset.unsqueeze(start_tensor, zero_scalar).output(
0View on GitHub (pinned to 7a34a03db6)