keras-team/keras · error · ValueError

`slice` operation requires tuple for `start_indices with the

Error message

`slice` operation requires tuple for `start_indices with the openvino backend. Received: start_indices={start_indices}

What it means

Error "`slice` operation requires tuple for `start_indices with the openvino backend. Received: start_indices={start_indices}" thrown in keras-team/keras.

Source

Thrown at keras/src/backend/openvino/core.py:1363

    elif reduction in ("max", "min"):
        ov_reduction = reduction
    else:
        raise ValueError(f"Unsupported reduction: {reduction}")

    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 "

View on GitHub (pinned to 7a34a03db6)

When it happens

Trigger: Thrown at keras/src/backend/openvino/core.py:1363 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/468fcae39e8ae377. Report an issue: GitHub.