Skip to content
Snippets Groups Projects
Commit 3db6f927 authored by auphelia's avatar auphelia
Browse files

[Test] Added values for input tensor and created call for execute_onnx of the maxpool model

parent 67d7aa9f
No related branches found
No related tags found
No related merge requests found
# import onnx
import numpy as np
from onnx import TensorProto, helper
import finn.core.onnx_exec as oxe
from finn.core.datatype import DataType
from finn.core.modelwrapper import ModelWrapper
......@@ -33,3 +35,44 @@ def test_layer_streaming_maxpool():
model.set_tensor_datatype(tensor.name, DataType["BIPOLAR"])
# onnx.save(model.model, "max-pool-model.onnx")
input_tensor = np.asarray(
[
1,
-1,
1,
-1,
-1,
1,
1,
1,
1,
-1,
-1,
1,
1,
-1,
1,
-1,
1,
1,
-1,
1,
-1,
-1,
-1,
-1,
-1,
1,
1,
-1,
1,
1,
1,
-1,
],
dtype=np.float32,
).reshape(2, 4, 4)
input_dict = {"in": input_tensor}
output_dict = oxe.execute_onnx(model, input_dict)
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