{"record":{"id":"63608ca6e9f66142","repo":"keras-team/keras","slug":"invalid-start-points-shape-expected-4-2-for-a-s-63608c","errorCode":null,"errorMessage":"Invalid start_points shape: expected (4,2) for a single image or (N,4,2) for a batch. Received shape: {start_points.shape}","messagePattern":"Invalid start_points shape: expected \\(4,2\\) for a single image or \\(N,4,2\\) for a batch\\. Received shape: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/tensorflow/image.py","lineNumber":431,"sourceCode":"\n    if interpolation not in AFFINE_TRANSFORM_INTERPOLATIONS:\n        raise ValueError(\n            \"Invalid value for argument `interpolation`. Expected of one \"\n            f\"{AFFINE_TRANSFORM_INTERPOLATIONS}. Received: \"\n            f\"interpolation={interpolation}\"\n        )\n    if len(images.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={images.shape}\"\n        )\n\n    if start_points.shape.rank not in (2, 3) or start_points.shape[-2:] != (\n        4,\n        2,\n    ):\n        raise ValueError(\n            \"Invalid start_points shape: expected (4,2) for a single image\"\n            f\" or (N,4,2) for a batch. Received shape: {start_points.shape}\"\n        )\n    if end_points.shape.rank not in (2, 3) or end_points.shape[-2:] != (4, 2):\n        raise ValueError(\n            \"Invalid end_points shape: expected (4,2) for a single image\"\n            f\" or (N,4,2) for a batch. Received shape: {end_points.shape}\"\n        )\n    if start_points.shape != end_points.shape:\n        raise ValueError(\n            \"start_points and end_points must have the same shape.\"\n            f\" Received start_points.shape={start_points.shape}, \"\n            f\"end_points.shape={end_points.shape}\"\n        )\n\n    need_squeeze = False\n    if len(images.shape) == 3:\n        images = tf.expand_dims(images, axis=0)","sourceCodeStart":413,"sourceCodeEnd":449,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/tensorflow/image.py#L413-L449","documentation":"Error \"Invalid start_points shape: expected (4,2) for a single image or (N,4,2) for a batch. Received shape: {start_points.shape}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/tensorflow/image.py:431 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"}