{"record":{"id":"92bfc0cb00681dd0","repo":"keras-team/keras","slug":"all-entries-in-input-tensors-must-be-kerastensor","errorCode":null,"errorMessage":"All entries in `input_tensors` must be KerasTensors. Received invalid values: inputs_tensors={input_tensors}","messagePattern":"All entries in `input_tensors` must be KerasTensors\\. Received invalid values: inputs_tensors=(.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/models/cloning.py","lineNumber":385,"sourceCode":"\n    if not callable(clone_function):\n        raise ValueError(\n            \"Expected `clone_function` argument to be a callable. \"\n            f\"Received: clone_function={clone_function}\"\n        )\n\n    if not isinstance(model, Functional):\n        raise ValueError(\n            \"Expected `model` argument \"\n            f\"to be a Functional Model instance. Received: model={model}\"\n        )\n\n    if input_tensors is not None:\n        if not all(\n            isinstance(x, backend.KerasTensor)\n            for x in tree.flatten(input_tensors)\n        ):\n            raise ValueError(\n                \"All entries in `input_tensors` must be KerasTensors. \"\n                f\"Received invalid values: inputs_tensors={input_tensors}\"\n            )\n        try:\n            tree.assert_same_structure(input_tensors, model.input)\n        except ValueError as e:\n            raise ValueError(\n                \"`input_tensors` must have the same structure as model.input\"\n                f\"\\nReference structure: {model.input}\"\n                f\"\\nReceived structure: {input_tensors}\"\n            ) from e\n    else:\n        input_tensors = tree.map_structure(\n            lambda x: Input(batch_shape=x.shape, dtype=x.dtype, name=x.name),\n            model.input,\n        )\n\n    def operation_fn(layer):","sourceCodeStart":367,"sourceCodeEnd":403,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/models/cloning.py#L367-L403","documentation":"Error \"All entries in `input_tensors` must be KerasTensors. Received invalid values: inputs_tensors={input_tensors}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/models/cloning.py:385 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"}