aboutsummaryrefslogtreecommitdiffstats
path: root/model-integration/src/test/models/onnx/add_float.py
diff options
context:
space:
mode:
Diffstat (limited to 'model-integration/src/test/models/onnx/add_float.py')
-rwxr-xr-xmodel-integration/src/test/models/onnx/add_float.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/model-integration/src/test/models/onnx/add_float.py b/model-integration/src/test/models/onnx/add_float.py
new file mode 100755
index 00000000000..e18b2c46d9d
--- /dev/null
+++ b/model-integration/src/test/models/onnx/add_float.py
@@ -0,0 +1,27 @@
+# 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(
+ 'Add',
+ ['input1', 'input2'],
+ ['output'],
+ ),
+]
+graph_def = helper.make_graph(
+ nodes,
+ 'add',
+ [
+ INPUT_1,
+ INPUT_2
+ ],
+ [OUTPUT],
+)
+model_def = helper.make_model(graph_def, producer_name='add_float.py', opset_imports=[onnx.OperatorSetIdProto(version=12)])
+onnx.save(model_def, 'add_float.onnx')