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 c0c633c commit 3d4f554Copy full SHA for 3d4f554
tools/onnx-graphsurgeon/examples/04_modifying_a_model/modify.py
@@ -43,6 +43,6 @@
43
# Therefore, you should only need to sort the graph when you have added new nodes out-of-order.
44
# In this case, the identity node is already in the correct spot (it is the last node,
45
# and was appended to the end of the list), but to be on the safer side, we can sort anyway.
46
-graph.cleanup().toposort()
+graph.cleanup(remove_unused_graph_inputs=True).toposort()
47
48
onnx.save(gs.export_onnx(graph), "modified.onnx")
0 commit comments