{"record":{"id":"ebc8e03f4e1e3d89","repo":"keras-team/keras","slug":"invalid-functional-model-configuration-the-graph","errorCode":null,"errorMessage":"Invalid Functional model configuration. The graph of the Functional model either has loops or disconnected nodes. The following nodes failed to be resolved: {unprocessed_nodes}","messagePattern":"Invalid Functional model configuration\\. The graph of the Functional model either has loops or disconnected nodes\\. The following nodes failed to be resolved: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/models/functional.py","lineNumber":641,"sourceCode":"\n                    # If the node does not have all inbound layers\n                    # available, stop processing and continue later\n                    except IndexError:\n                        break\n\n                    node_index += 1\n\n                # If all nodes processed remove the layer\n                if node_index >= len(node_data_list):\n                    some_nodes_processed = True\n                    del unprocessed_nodes[layer]\n                # If not all nodes processed then store unprocessed nodes\n                elif node_index > 0:\n                    some_nodes_processed = True\n                    unprocessed_nodes[layer] = node_data_list[node_index:]\n\n        if not some_nodes_processed:\n            raise ValueError(\n                \"Invalid Functional model configuration. The graph of the \"\n                \"Functional model either has loops or disconnected nodes. \"\n                \"The following nodes failed to be resolved: \"\n                f\"{unprocessed_nodes}\"\n            )\n\n    # Create list of input and output tensors and return new class\n    name = functional_config[\"name\"]\n    trainable = functional_config[\"trainable\"]\n\n    def get_tensor(layer_name, node_index, tensor_index):\n        if layer_name not in created_layers:\n            raise RuntimeError(\n                f\"Internal error: could not find layer {layer_name}.\"\n            )\n        layer = created_layers[layer_name]\n        if isinstance(layer, Functional):\n            # Functional models start out with a built-in node.","sourceCodeStart":623,"sourceCodeEnd":659,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/models/functional.py#L623-L659","documentation":"Error \"Invalid Functional model configuration. The graph of the Functional model either has loops or disconnected nodes. The following nodes failed to be resolved: {unprocessed_nodes}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/models/functional.py:641 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"}