trouble when use finn.transformation.fold_constants #583
Unanswered
newpythonnoob
asked this question in
Q&A
Replies: 2 comments 3 replies
-
Hi, could you share your input .onnx model? There seems to be something wrong with it. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Hi newpythonnoob, I'm also working on implementing a U-Net with FINN. I'd be interested to discuss this with you. Here's my email address: julien.mastrangelo@polymtl.ca |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I follow the 1_brevitas_network_import and try to build my own model,but when I try to run the cleanup step it reports:
`model = model.transform(FoldConstants())
Exception Traceback (most recent call last)
in
----> 1 model = model.transform(FoldConstants())
/workspace/finn-base/src/finn/core/modelwrapper.py in transform(self, transformation, make_deepcopy, cleanup, fix_float64)
139 model_was_changed = True
140 while model_was_changed:
--> 141 (transformed_model, model_was_changed) = transformation.apply(
142 transformed_model
143 )
/workspace/finn-base/src/finn/transformation/fold_constants.py in apply(self, model)
57 # this node has no dynamic inputs, only constant ones -- so we can
58 # do constant folding.
---> 59 oxe.execute_node(n, execution_context, graph)
60 # use the execution result as an initializer
61 model.set_initializer(node_out, execution_context[node_out])
/workspace/finn-base/src/finn/core/onnx_exec.py in execute_node(node, context, graph, return_full_exec_context, opset_version)
119 # use that index to index output_list
120 if output_list[list_ind].shape != context[outp].shape:
--> 121 raise Exception(
122 """Output shapes disagree after node execution:
123 found %s vs expected %s"""
Exception: Output shapes disagree after node execution:
found (4,) vs expected (0,)`
I have no idea how to solve it
Beta Was this translation helpful? Give feedback.
All reactions