aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/cfg/application/onnx/models/mul.py
diff options
context:
space:
mode:
authorLester Solbakken <lesters@oath.com>2021-05-21 09:33:32 +0200
committerLester Solbakken <lesters@oath.com>2021-05-21 09:33:32 +0200
commit6448742f804482946a7bf2d17723dca6b4100b73 (patch)
tree135038f0298f3e519ed8e4327cf1bf1915df4b39 /config-model/src/test/cfg/application/onnx/models/mul.py
parent864eb3da782e9795826ec78add953a76eeb2ea17 (diff)
Wire in stateless ONNX runtime evaluation
Diffstat (limited to 'config-model/src/test/cfg/application/onnx/models/mul.py')
-rwxr-xr-xconfig-model/src/test/cfg/application/onnx/models/mul.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/config-model/src/test/cfg/application/onnx/models/mul.py b/config-model/src/test/cfg/application/onnx/models/mul.py
new file mode 100755
index 00000000000..db01561c355
--- /dev/null
+++ b/config-model/src/test/cfg/application/onnx/models/mul.py
@@ -0,0 +1,26 @@
+# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+import onnx
+from onnx import helper, TensorProto
+
+INPUT_1 = helper.make_tensor_value_info('input1', TensorProto.FLOAT, [1])
+INPUT_2 = helper.make_tensor_value_info('input2', TensorProto.FLOAT, [1])
+OUTPUT = helper.make_tensor_value_info('output', TensorProto.FLOAT, [1])
+
+nodes = [
+ helper.make_node(
+ 'Mul',
+ ['input1', 'input2'],
+ ['output'],
+ ),
+]
+graph_def = helper.make_graph(
+ nodes,
+ 'mul',
+ [
+ INPUT_1,
+ INPUT_2
+ ],
+ [OUTPUT],
+)
+model_def = helper.make_model(graph_def, producer_name='mul.py', opset_imports=[onnx.OperatorSetIdProto(version=12)])
+onnx.save(model_def, 'mul.onnx')