{"record":{"id":"11627cfc8c2a9168","repo":"keras-team/keras","slug":"slice-is-not-supported-by-openvino-backend-for","errorCode":null,"errorMessage":"`slice` is not supported by OpenVINO backend for `start_indices` or `shape` with non-integer types","messagePattern":"`slice` is not supported by OpenVINO backend for `start_indices` or `shape` with non-integer types","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/openvino/core.py","lineNumber":1380,"sourceCode":"    if not isinstance(start_indices, tuple):\n        raise ValueError(\n            \"`slice` operation requires tuple for `start_indices with the \"\n            f\"openvino backend. Received: start_indices={start_indices}\"\n        )\n    if not isinstance(shape, tuple):\n        raise ValueError(\n            \"`slice` operation requires tuple for `shape` with the \"\n            f\"openvino backend. Received: shape={shape}\"\n        )\n\n    axes = []\n    start = []\n    stop = []\n\n    def prepare_slice_index(val):\n        val_type = val.get_element_type()\n        if not val_type.is_integral():\n            raise ValueError(\n                \"`slice` is not supported by OpenVINO backend \"\n                \"for `start_indices` or `shape` with non-integer types\"\n            )\n        if val_type != Type.i32:\n            val = ov_opset.convert(val, Type.i32).output(0)\n        if len(val.get_partial_shape()) == 0:\n            val = ov_opset.unsqueeze(\n                val, ov_opset.constant(0, Type.i32)\n            ).output(0)\n        return val\n\n    for idx, length in enumerate(shape):\n        if length is not None and (\n            isinstance(length, OpenVINOKerasTensor) or length >= 0\n        ):\n            axes.append(idx)\n            start_val = prepare_slice_index(get_ov_output(start_indices[idx]))\n            stop_val = prepare_slice_index(","sourceCodeStart":1362,"sourceCodeEnd":1398,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/openvino/core.py#L1362-L1398","documentation":"Error \"`slice` is not supported by OpenVINO backend for `start_indices` or `shape` with non-integer types\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/openvino/core.py:1380 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a34a03db60bf60042242d6a556fc3be119046a5","analyzedAt":"2026-08-25T21:25:25.994Z","schemaVersion":2},"datasetVersion":"2026-08-26T02:17:13.382Z"}