{"record":{"id":"836e5542bbde2f9d","repo":"keras-team/keras","slug":"cannot-deserialize-the-model-invalid-config-data","errorCode":null,"errorMessage":"Cannot deserialize the model (invalid config data?)","messagePattern":"Cannot deserialize the model \\(invalid config data\\?\\)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/models/functional.py","lineNumber":758,"sourceCode":"\ndef deserialize_node(node_data, created_layers):\n    \"\"\"Return (args, kwargs) for calling the node layer.\"\"\"\n    if not node_data:\n        return [], {}\n\n    if isinstance(node_data, list):\n        # Legacy case.\n        input_tensors = []\n        for input_data in node_data:\n            inbound_layer_name = input_data[0]\n            inbound_node_index = input_data[1]\n            inbound_tensor_index = input_data[2]\n            if len(input_data) == 3:\n                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\"","sourceCodeStart":740,"sourceCodeEnd":776,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/models/functional.py#L740-L776","documentation":"Error \"Cannot deserialize the model (invalid config data?)\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/models/functional.py:758 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"}