keras-team/keras · error · ValueError

Invalid Functional model configuration. Missing node

Error message

Invalid Functional model configuration. Missing node: {inbound_layer_name}

What it means

Raised during legacy Functional deserialization: a node references an inbound layer by name that has not been (and will not be) created by the reconstruction pass. This indicates the config's layer list and its node connectivity are out of sync — a layer was removed, renamed, or the config was hand-edited.

Solutions

  1. Restore the missing layer entry in the config, or fix the inbound reference to the correct layer name
  2. Regenerate the model config from a working model rather than editing it
  3. Check that custom layer names on save and load are identical
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at keras/src/models/functional.py:763 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25). Data as JSON: /api/errors/74c5b05072e31b32. Report an issue: GitHub.

Appendix: source

Thrown at keras/src/models/functional.py:763

    if isinstance(node_data, list):
        # Legacy case.
        input_tensors = []
        for input_data in node_data:
            inbound_layer_name = input_data[0]
            inbound_node_index = input_data[1]
            inbound_tensor_index = input_data[2]
            if len(input_data) == 3:
                kwargs = {}
            elif len(input_data) == 4:
                kwargs = input_data[3]
            else:
                raise ValueError(
                    "Cannot deserialize the model (invalid config data?)"
                )

            if inbound_layer_name not in created_layers:
                raise ValueError(
                    "Invalid Functional model configuration. Missing node: "
                    f"{inbound_layer_name}"
                )
            inbound_layer = created_layers[inbound_layer_name]

            # Raise an error if the corresponding layer node
            # has not yet been created
            if len(inbound_layer._inbound_nodes) <= inbound_node_index:
                raise IndexError(
                    "Layer node index out of bounds.\n"
                    f"inbound_layer = {inbound_layer}\n"
                    "inbound_layer._inbound_nodes = "
                    f"{inbound_layer._inbound_nodes}\n"
                    f"inbound_node_index = {inbound_node_index}"
                )
            inbound_node = inbound_layer._inbound_nodes[inbound_node_index]
            input_tensors.append(
                inbound_node.output_tensors[inbound_tensor_index]

View on GitHub (pinned to 7a34a03db6)