{"record":{"id":"a1a45abf08273bd7","repo":"keras-team/keras","slug":"all-outputs-values-must-be-kerastensors-receive","errorCode":null,"errorMessage":"All `outputs` values must be KerasTensors. Received: outputs={outputs} including invalid value {x} of type {type(x)}","messagePattern":"All `outputs` values must be KerasTensors\\. Received: outputs=(.+?) including invalid value (.+?) of type (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/models/functional.py","lineNumber":126,"sourceCode":"                        \"dict must match the names of the corresponding \"\n                        f\"tensors. Received key '{k}' mapping to value {v} \"\n                        f\"which has name '{v.name}'. Change the tensor name to \"\n                        f\"'{k}' (via `Input(..., name='{k}')`)\"\n                    )\n\n        trainable = kwargs.pop(\"trainable\", None)\n        flat_inputs = tree.flatten(inputs)\n        flat_outputs = tree.flatten(outputs)\n        for x in flat_inputs:\n            if not isinstance(x, backend.KerasTensor):\n                raise ValueError(\n                    \"All `inputs` values must be KerasTensors. Received: \"\n                    f\"inputs={inputs} including invalid value {x} of \"\n                    f\"type {type(x)}\"\n                )\n        for x in flat_outputs:\n            if not isinstance(x, backend.KerasTensor):\n                raise ValueError(\n                    \"All `outputs` values must be KerasTensors. Received: \"\n                    f\"outputs={outputs} including invalid value {x} of \"\n                    f\"type {type(x)}\"\n                )\n\n        if not all(is_input_keras_tensor(t) for t in flat_inputs):\n            inputs, outputs = clone_graph_nodes(inputs, outputs)\n\n        with tracking.DotNotTrackScope():\n            Function.__init__(self, inputs, outputs, name=name)\n\n        if trainable is not None:\n            self.trainable = trainable\n\n        for layer in self.layers:\n            self._tracker.track(layer)\n        self.build(None)\n        # We will convert directly (to the correct dtype per input).","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/models/functional.py#L108-L144","documentation":"Error \"All `outputs` values must be KerasTensors. Received: outputs={outputs} including invalid value {x} of type {type(x)}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/models/functional.py:126 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"}