{"record":{"id":"53e3df7f821e0448","repo":"keras-team/keras","slug":"first-dim-of-coordinates-must-be-the-same-as-the-53e3df","errorCode":null,"errorMessage":"First dim of `coordinates` must be the same as the rank of `inputs`. Received inputs with shape: {tuple(input_shape.to_shape())} and coordinate leading dim of {coords_shape[0].get_length()}","messagePattern":"First dim of `coordinates` must be the same as the rank of `inputs`\\. Received inputs with shape: (.+?) and coordinate leading dim of (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/openvino/image.py","lineNumber":1295,"sourceCode":"        raise ValueError(\n            \"Invalid value for argument `order`. Expected one of \"\n            f\"[0, 1]. Received: order={order}\"\n        )\n\n    inputs = convert_to_tensor(inputs)\n    coordinates = convert_to_tensor(coordinates)\n    inputs_ov = get_ov_output(inputs)\n    coords_ov = get_ov_output(coordinates)\n    input_shape = inputs_ov.get_partial_shape()\n    ndim = input_shape.rank.get_length()\n    coords_shape = coords_ov.get_partial_shape()\n    if coords_shape.rank.is_static and coords_shape.rank.get_length() < 2:\n        raise ValueError(\n            \"Invalid coordinates rank: expected at least rank 2.\"\n            f\" Received input with shape: {tuple(coords_shape.to_shape())}\"\n        )\n    if coords_shape[0].is_static and coords_shape[0].get_length() != ndim:\n        raise ValueError(\n            \"First dim of `coordinates` must be the same as the rank of \"\n            \"`inputs`. \"\n            f\"Received inputs with shape: {tuple(input_shape.to_shape())} and \"\n            f\"coordinate leading dim of {coords_shape[0].get_length()}\"\n        )\n    ov_type = inputs_ov.get_element_type()\n\n    # Coordinates must be float for arithmetic\n    coords_ov = ov_opset.convert(coords_ov, Type.f32).output(0)\n\n    # Split coordinates into per-dimension tensors, each shape [*output_shape]\n    axis_0 = ov_opset.constant(0, dtype=Type.i32).output(0)\n    coord_list = [\n        ov_opset.gather(\n            coords_ov,\n            ov_opset.constant(i, dtype=Type.i32).output(0),\n            axis_0,\n        ).output(0)","sourceCodeStart":1277,"sourceCodeEnd":1313,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/openvino/image.py#L1277-L1313","documentation":"Error \"First dim of `coordinates` must be the same as the rank of `inputs`. Received inputs with shape: {tuple(input_shape.to_shape())} and coordinate leading dim of {coords_shape[0].get_length()}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/openvino/image.py:1295 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"}