{"record":{"id":"600b9adf40dbfe0c","repo":"keras-team/keras","slug":"invalid-images-rank-expected-rank-3-single-image-600b9a","errorCode":null,"errorMessage":"Invalid images rank: expected rank 3 (single image) or rank 4 (batch of images). Received input with shape: images.shape={input_shape}","messagePattern":"Invalid images rank: expected rank 3 \\(single image\\) or rank 4 \\(batch of images\\)\\. Received input with shape: images\\.shape=(.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/openvino/image.py","lineNumber":1492,"sourceCode":"            ).output(0)\n\n            # kernel1d_y has kW elements -> column vector [kW, 1]\n            kernel1d_y = ov_opset.reshape(\n                kernel1d_y,\n                ov_opset.constant([int(size[1]), 1], Type.i32).output(0),\n                False,\n            ).output(0)\n            return ov_opset.multiply(kernel1d_y, kernel1d_x).output(0)\n\n        return _get_gaussian_kernel2d(kernel_size, sigma)\n\n    data_format = backend.standardize_data_format(data_format)\n    images = convert_to_tensor(images)\n    input_shape = images.shape\n    ov_type = get_ov_output(images).get_element_type()\n\n    if len(input_shape) not in (3, 4):\n        raise ValueError(\n            \"Invalid images rank: expected rank 3 (single image) \"\n            \"or rank 4 (batch of images). Received input with shape: \"\n            f\"images.shape={input_shape}\"\n        )\n\n    # bfloat16 is not supported by all OV ops used here; promote to f32.\n    # f16 constants in range() would mismatch with the f32 arithmetic\n    # constants in the kernel builder, so promote f16 to f32 as well.\n    compute_type = Type.f32 if ov_type in (Type.bf16, Type.f16) else ov_type\n    images = get_ov_output(images)\n    if compute_type != ov_type:\n        images = ov_opset.convert(images, compute_type).output(0)\n\n    need_squeeze = False\n    if len(input_shape) == 3:\n        images = ov_opset.unsqueeze(images, axes=[0]).output(0)\n        need_squeeze = True\n","sourceCodeStart":1474,"sourceCodeEnd":1510,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/openvino/image.py#L1474-L1510","documentation":"Error \"Invalid images rank: expected rank 3 (single image) or rank 4 (batch of images). Received input with shape: images.shape={input_shape}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/openvino/image.py:1492 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"}