diff --git a/src/finn/data/onnx/mixed-model/mixed_model.onnx b/src/finn/data/onnx/mixed-model/mixed_model.onnx new file mode 100644 index 0000000000000000000000000000000000000000..79b1fa97773b768aa57e7663f69368ec56a8980f --- /dev/null +++ b/src/finn/data/onnx/mixed-model/mixed_model.onnx @@ -0,0 +1,31 @@ +onnx-example:È ++ +v + +thresholdsout0"MultiThreshold:finn + +out0out1"Relu +test-modelZ +v + + + + +Z + +thresholds + + +b +out1 + + + + +j +out0 + + + + +B \ No newline at end of file diff --git a/tests/test_infer_shapes.py b/tests/test_infer_shapes.py new file mode 100644 index 0000000000000000000000000000000000000000..1c91a0740df1adfcc4c8e5429ff544f1ee8775ff --- /dev/null +++ b/tests/test_infer_shapes.py @@ -0,0 +1,17 @@ +from pkgutil import get_data + +import numpy as np +import onnx +import onnx.numpy_helper as np_helper + +import finn.core.onnx_exec as oxe +import finn.transformation.infer_shapes as si +from finn.core.modelwrapper import ModelWrapper + + +def test_infer_shapes(): + # load the onnx model + raw_m = get_data("finn", "data/onnx/mixed-model/mixed_model.onnx") + model = ModelWrapper(raw_m) + model = model.transform_single(si.infer_shapes) +