{"record":{"id":"0301bccdc981d019","repo":"keras-team/keras","slug":"layer-node-index-out-of-bounds-ninbound-layer","errorCode":null,"errorMessage":"Layer node index out of bounds.\\ninbound_layer = {inbound_layer}\\ninbound_layer._inbound_nodes = {inbound_layer._inbound_nodes}\\ninbound_node_index = {inbound_node_index}","messagePattern":"Layer node index out of bounds\\.\\\\ninbound_layer = (.+?)\\\\ninbound_layer\\._inbound_nodes = (.+?)\\\\ninbound_node_index = (.+?)","errorType":"exception","errorClass":"IndexError","httpStatus":null,"severity":"error","filePath":"keras/src/models/functional.py","lineNumber":772,"sourceCode":"                kwargs = {}\n            elif len(input_data) == 4:\n                kwargs = input_data[3]\n            else:\n                raise ValueError(\n                    \"Cannot deserialize the model (invalid config data?)\"\n                )\n\n            if inbound_layer_name not in created_layers:\n                raise ValueError(\n                    \"Invalid Functional model configuration. Missing node: \"\n                    f\"{inbound_layer_name}\"\n                )\n            inbound_layer = created_layers[inbound_layer_name]\n\n            # Raise an error if the corresponding layer node\n            # has not yet been created\n            if len(inbound_layer._inbound_nodes) <= inbound_node_index:\n                raise IndexError(\n                    \"Layer node index out of bounds.\\n\"\n                    f\"inbound_layer = {inbound_layer}\\n\"\n                    \"inbound_layer._inbound_nodes = \"\n                    f\"{inbound_layer._inbound_nodes}\\n\"\n                    f\"inbound_node_index = {inbound_node_index}\"\n                )\n            inbound_node = inbound_layer._inbound_nodes[inbound_node_index]\n            input_tensors.append(\n                inbound_node.output_tensors[inbound_tensor_index]\n            )\n        return [unpack_singleton(input_tensors)], kwargs\n\n    args = serialization_lib.deserialize_keras_object(node_data[\"args\"])\n    kwargs = serialization_lib.deserialize_keras_object(node_data[\"kwargs\"])\n\n    def convert_revived_tensor(x):\n        if isinstance(x, backend.KerasTensor):\n            history = x._pre_serialization_keras_history","sourceCodeStart":754,"sourceCodeEnd":790,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/models/functional.py#L754-L790","documentation":"Error \"Layer node index out of bounds.\\ninbound_layer = {inbound_layer}\\ninbound_layer._inbound_nodes = {inbound_layer._inbound_nodes}\\ninbound_node_index = {inbound_node_index}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/models/functional.py:772 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"}