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

[Test] shape inf + fold consts to get rid of Cast in ToTensor

parent 1475c994
No related branches found
No related tags found
No related merge requests found
......@@ -347,6 +347,8 @@ class TestEnd2End:
assert os.path.isfile(chkpt_preproc_name)
# join preprocessing and core model
pre_model = ModelWrapper(chkpt_preproc_name)
pre_model = pre_model.transform(InferShapes())
pre_model = pre_model.transform(FoldConstants())
model = model.transform(MergeONNXModels(pre_model))
# add input quantization annotation: UINT8 for all BNN-PYNQ models
global_inp_name = model.graph.input[0].name
......
......@@ -101,6 +101,7 @@ def test_end2end_mobilenet_export():
# set input finn datatype to UINT8
preproc_model.set_tensor_datatype(preproc_model.graph.input[0].name, DataType.UINT8)
preproc_model = preproc_model.transform(InferShapes())
preproc_model = preproc_model.transform(FoldConstants())
preproc_model = preproc_model.transform(GiveUniqueNodeNames())
preproc_model = preproc_model.transform(GiveUniqueParameterTensors())
preproc_model = preproc_model.transform(GiveReadableTensorNames())
......
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