{"record":{"id":"4c671a86b3e093ed","repo":"keras-team/keras","slug":"unknown-layer-history-0","errorCode":null,"errorMessage":"Unknown layer: {history[0]}","messagePattern":"Unknown layer: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/models/functional.py","lineNumber":795,"sourceCode":"                    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\n            if history is None:\n                return x\n            layer = created_layers.get(history[0], None)\n            if layer is None:\n                raise ValueError(f\"Unknown layer: {history[0]}\")\n            inbound_node_index = history[1]\n            inbound_tensor_index = history[2]\n            if len(layer._inbound_nodes) <= inbound_node_index:\n                raise IndexError(\n                    \"Layer node index out of bounds.\\n\"\n                    f\"inbound_layer = {layer}\\n\"\n                    f\"inbound_layer._inbound_nodes = {layer._inbound_nodes}\\n\"\n                    f\"inbound_node_index = {inbound_node_index}\"\n                )\n            inbound_node = layer._inbound_nodes[inbound_node_index]\n            return inbound_node.output_tensors[inbound_tensor_index]\n        return x\n\n    args = tree.map_structure(convert_revived_tensor, args)\n    kwargs = tree.map_structure(convert_revived_tensor, kwargs)\n    return args, kwargs\n\n","sourceCodeStart":777,"sourceCodeEnd":813,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/models/functional.py#L777-L813","documentation":"Error \"Unknown layer: {history[0]}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/models/functional.py:795 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"}