Skip to content
Snippets Groups Projects
Commit 59a23e88 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[Transform] do shape inference after const folding

parent a3ac2200
No related branches found
No related tags found
No related merge requests found
import finn.core.onnx_exec as oxe
import finn.transformation.infer_shapes as si
def fold_constants(model):
......@@ -25,5 +26,6 @@ def fold_constants(model):
# remove old node
graph.node.remove(n)
graph_modified = True
# TODO remove unused tensors?
if graph_modified:
model = model.transform_single(si.infer_shapes)
return (model, graph_modified)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment