From b632cbb46e1991aa5b5e1739eb06bedbf7a08655 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=94=D0=B8=D0=BB=D1=88=D0=BE=D0=B4=D0=B6=D0=BE=D0=BD=20?= =?utf8?q?=D0=A3=D0=BC=D1=80=D0=BE=D0=BD=D1=85=D0=BE=D0=BD=D0=BE=D0=B2?= =?utf8?q?=D0=B8=D1=87=20=D0=9F=D0=BE=D1=88=D1=88=D0=BE=D0=B5=D0=B2/AI=20T?= =?utf8?q?ools=20Lab=20/SRR/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Fri, 14 Dec 2018 04:02:43 +0300 Subject: [PATCH] Add tests for LogicalNot (#3600) This commit adds tests for LogicalNot op Signed-off-by: Poshshoev Dilshodzhon --- .../runtime_run_android_nn_test.skip.armv7l-linux | 1 + .../runtime_run_android_nn_test.skip.armv7l-linux.neurun | 1 + .../runtime_run_android_nn_test.skip.armv7l-tizen | 1 + .../runtime_run_android_nn_test.skip.x86_64-linux | 1 + .../specs/Ex/logical_not_ex_1D.mod.py | 16 ++++++++++++++++ .../specs/Ex/logical_not_ex_4D.mod.py | 16 ++++++++++++++++ 6 files changed, 36 insertions(+) create mode 100644 runtimes/tests/neural_networks_test/specs/Ex/logical_not_ex_1D.mod.py create mode 100644 runtimes/tests/neural_networks_test/specs/Ex/logical_not_ex_4D.mod.py diff --git a/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-linux b/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-linux index 010e75a..b5d46e6 100644 --- a/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-linux +++ b/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-linux @@ -17,6 +17,7 @@ GeneratedTests.prelu_ex* GeneratedTests.svdf GeneratedTests.svdf2 GeneratedTests.svdf_state +GeneratedTests.logical_not_ex* ValidationTestCompilation.CreateExecution ValidationTestCompilation.SetPreference ValidationTestIdentify.DuplicateInputs diff --git a/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-linux.neurun b/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-linux.neurun index 17360b3..288c464 100644 --- a/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-linux.neurun +++ b/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-linux.neurun @@ -119,3 +119,4 @@ GeneratedTests.split* GeneratedTests.transpose_conv* GeneratedTests.pack* GeneratedTests.unpack* +GeneratedTests.logical_not_ex* diff --git a/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-tizen b/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-tizen index f4203b6..ebb51de 100644 --- a/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-tizen +++ b/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-tizen @@ -16,6 +16,7 @@ GeneratedTests.prelu_ex* GeneratedTests.svdf GeneratedTests.svdf2 GeneratedTests.svdf_state +GeneratedTests.logical_not_ex* ValidationTestCompilation.CreateExecution ValidationTestCompilation.SetPreference ValidationTestIdentify.DuplicateInputs diff --git a/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.x86_64-linux b/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.x86_64-linux index e43e88e..e87c4ac 100644 --- a/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.x86_64-linux +++ b/runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.x86_64-linux @@ -73,6 +73,7 @@ GeneratedTests.strided_slice GeneratedTests.tensorflowmax_ex* GeneratedTests.reduce_sum_ex* GeneratedTests.sub_broadcast_float +GeneratedTests.logical_not_ex* TrivialTest.* ValidationTest.* ValidationTestModel.* diff --git a/runtimes/tests/neural_networks_test/specs/Ex/logical_not_ex_1D.mod.py b/runtimes/tests/neural_networks_test/specs/Ex/logical_not_ex_1D.mod.py new file mode 100644 index 0000000..a913b19 --- /dev/null +++ b/runtimes/tests/neural_networks_test/specs/Ex/logical_not_ex_1D.mod.py @@ -0,0 +1,16 @@ +# model +model = Model() +i = Input("op1", "TENSOR_QUANT8_ASYMM", "{4}, 1.f, 0") + +o = Output("op2", "TENSOR_QUANT8_ASYMM", "{4}, 1.f, 0") +model = model.Operation("LOGICAL_NOT_EX", i).To(o) + +# Example 1. Input +input0 = {i: # input + [255, 0, 255, 255]} + +output0 = {o: # output + [0, 255, 0, 0]} + +# Instantiate an example +Example((input0, output0)) diff --git a/runtimes/tests/neural_networks_test/specs/Ex/logical_not_ex_4D.mod.py b/runtimes/tests/neural_networks_test/specs/Ex/logical_not_ex_4D.mod.py new file mode 100644 index 0000000..49306fc --- /dev/null +++ b/runtimes/tests/neural_networks_test/specs/Ex/logical_not_ex_4D.mod.py @@ -0,0 +1,16 @@ +# model +model = Model() +i = Input("op1", "TENSOR_QUANT8_ASYMM", "{1, 2, 2, 1}, 1.f, 0") # a vector of input + +o = Output("op2", "TENSOR_QUANT8_ASYMM", "{1, 2, 2, 1}, 1.f, 0") # a vector of output +model = model.Operation("LOGICAL_NOT_EX", i).To(o) + +# Example 1. Input +input0 = {i: # input + [0, 255, 255, 255]} + +output0 = {o: # output + [255, 0, 0, 0]} + +# Instantiate an example +Example((input0, output0)) -- 2.7.4