We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60573b9 commit 3c26799Copy full SHA for 3c26799
pytensor/graph/basic.py
@@ -915,10 +915,8 @@ def clone_node_and_cache(
915
# Use a cached `Op` clone when available
916
new_op: Op | None = cast(Optional["Op"], clone_d.get(node.op))
917
918
- cloned_inputs: list[Variable] = [cast(Variable, clone_d[i]) for i in node.inputs]
919
-
920
new_node = node.clone_with_new_inputs(
921
- cloned_inputs,
+ [clone_d[i] for i in node.inputs],
922
# Only clone inner-graph `Op`s when there isn't a cached clone (and
923
# when `clone_inner_graphs` is enabled)
924
clone_inner_graph=clone_inner_graphs if new_op is None else False,
0 commit comments