Skip to content

Commit 9b22db4

Browse files
authored
Merge pull request #107 from iksnagreb/fix/fold_constants
Fix FoldConstants tranformation exiting early to redo shape annotations
2 parents f3690c8 + ddc1018 commit 9b22db4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/qonnx/transformation/fold_constants.py

+5
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ def apply(self, model):
111111
# remove old node
112112
nodes_to_remove.append(n)
113113
graph_modified = True
114+
# Exit the loop here, after changing a single node. The
115+
# ModelWrapper ensures to repeat this transformatin as long as
116+
# there are suitable nodes available.
117+
# See https://github.com/fastmachinelearning/qonnx/issues/104
118+
break
114119
for node in nodes_to_remove:
115120
model.graph.node.remove(node)
116121
if graph_modified:

0 commit comments

Comments
 (0)