diff options
Diffstat (limited to 'model-integration/src/test/models/onnx')
-rw-r--r-- | model-integration/src/test/models/onnx/simple/concat.onnx | bin | 0 -> 135 bytes | |||
-rwxr-xr-x | model-integration/src/test/models/onnx/simple/concat.py | 25 | ||||
-rw-r--r-- | model-integration/src/test/models/onnx/simple/const.onnx | bin | 0 -> 97 bytes | |||
-rwxr-xr-x | model-integration/src/test/models/onnx/simple/const.py | 26 | ||||
-rw-r--r-- | model-integration/src/test/models/onnx/simple/gather.onnx | bin | 150 -> 150 bytes | |||
-rw-r--r-- | model-integration/src/test/models/onnx/simple/simple.onnx | 4 |
6 files changed, 53 insertions, 2 deletions
diff --git a/model-integration/src/test/models/onnx/simple/concat.onnx b/model-integration/src/test/models/onnx/simple/concat.onnx Binary files differnew file mode 100644 index 00000000000..945bc3c9445 --- /dev/null +++ b/model-integration/src/test/models/onnx/simple/concat.onnx diff --git a/model-integration/src/test/models/onnx/simple/concat.py b/model-integration/src/test/models/onnx/simple/concat.py new file mode 100755 index 00000000000..b77cf5decc1 --- /dev/null +++ b/model-integration/src/test/models/onnx/simple/concat.py @@ -0,0 +1,25 @@ +# Copyright 2020 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +import onnx +import numpy as np +from onnx import helper, TensorProto + +i_type = helper.make_tensor_value_info('i', TensorProto.FLOAT, [1]) +j_type = helper.make_tensor_value_info('j', TensorProto.FLOAT, [1]) +k_type = helper.make_tensor_value_info('k', TensorProto.FLOAT, [1]) + +output_type = helper.make_tensor_value_info('y', TensorProto.FLOAT, [3]) + +node = onnx.helper.make_node( + 'Concat', + inputs=['i', 'j', 'k'], + outputs=['y'], + axis=0, +) +graph_def = onnx.helper.make_graph( + nodes = [node], + name = 'concat_test', + inputs = [i_type, j_type, k_type], + outputs = [output_type] +) +model_def = helper.make_model(graph_def, producer_name='concat.py') +onnx.save(model_def, 'concat.onnx') diff --git a/model-integration/src/test/models/onnx/simple/const.onnx b/model-integration/src/test/models/onnx/simple/const.onnx Binary files differnew file mode 100644 index 00000000000..c75a92ff12c --- /dev/null +++ b/model-integration/src/test/models/onnx/simple/const.onnx diff --git a/model-integration/src/test/models/onnx/simple/const.py b/model-integration/src/test/models/onnx/simple/const.py new file mode 100755 index 00000000000..35d6dee1346 --- /dev/null +++ b/model-integration/src/test/models/onnx/simple/const.py @@ -0,0 +1,26 @@ +# Copyright 2020 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +import onnx +import numpy as np +from onnx import helper, TensorProto + +output_type = helper.make_tensor_value_info('y', TensorProto.FLOAT, []) + +node = onnx.helper.make_node( + 'Constant', + inputs=[], + outputs=['y'], + value=onnx.helper.make_tensor( + name='const_tensor', + data_type=onnx.TensorProto.FLOAT, + dims=(), + vals=[0.42] + ), +) +graph_def = onnx.helper.make_graph( + nodes = [node], + name = 'constant_test', + inputs = [], + outputs = [output_type] +) +model_def = helper.make_model(graph_def, producer_name='const.py') +onnx.save(model_def, 'const.onnx') diff --git a/model-integration/src/test/models/onnx/simple/gather.onnx b/model-integration/src/test/models/onnx/simple/gather.onnx Binary files differindex 62451ad953d..0647d86ed0f 100644 --- a/model-integration/src/test/models/onnx/simple/gather.onnx +++ b/model-integration/src/test/models/onnx/simple/gather.onnx diff --git a/model-integration/src/test/models/onnx/simple/simple.onnx b/model-integration/src/test/models/onnx/simple/simple.onnx index 1c746c90efa..41b458451d0 100644 --- a/model-integration/src/test/models/onnx/simple/simple.onnx +++ b/model-integration/src/test/models/onnx/simple/simple.onnx @@ -1,4 +1,4 @@ - simple.py:ã + simple.py:ã 0 query_tensor attribute_tensormatmul"MatMul @@ -20,4 +20,4 @@ output -B +B
\ No newline at end of file |