{"record":{"id":"3fece31454520bea","repo":"keras-team/keras","slug":"top-cropping-must-be-0-received-top-cropping","errorCode":null,"errorMessage":"top_cropping must be >= 0. Received: top_cropping={top_cropping}","messagePattern":"top_cropping must be >= 0\\. Received: top_cropping=(.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/ops/image.py","lineNumber":1957,"sourceCode":"                f\"target_width={self.target_width}\"\n            )\n\n        target_height = self.target_height\n        if target_height is None:\n            target_height = height - self.top_cropping - self.bottom_cropping\n        target_width = self.target_width\n        if target_width is None:\n            target_width = width - self.left_cropping - self.right_cropping\n\n        if height is not None:\n            top_cropping = self.top_cropping\n            bottom_cropping = self.bottom_cropping\n            if top_cropping is None:\n                top_cropping = height - target_height - bottom_cropping\n            if bottom_cropping is None:\n                bottom_cropping = height - target_height - top_cropping\n            if top_cropping < 0:\n                raise ValueError(\n                    \"top_cropping must be >= 0. \"\n                    f\"Received: top_cropping={top_cropping}\"\n                )\n            if bottom_cropping < 0:\n                raise ValueError(\n                    \"bottom_cropping must be >= 0. \"\n                    f\"Received: bottom_cropping={bottom_cropping}\"\n                )\n            if target_height < 0:\n                raise ValueError(\n                    \"target_height must be >= 0. \"\n                    f\"Received: target_height={target_height}\"\n                )\n\n        if width is not None:\n            left_cropping = self.left_cropping\n            right_cropping = self.right_cropping\n            if left_cropping is None:","sourceCodeStart":1939,"sourceCodeEnd":1975,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/ops/image.py#L1939-L1975","documentation":"Error \"top_cropping must be >= 0. Received: top_cropping={top_cropping}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/ops/image.py:1957 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"}