Add gtest to test quant8 datatype for NotEqual Op (#3757)
authorShubham Gupta/SNAP /SRI-Bangalore/Engineer/삼성전자 <shub98.gupta@samsung.com>
Mon, 10 Dec 2018 01:44:09 +0000 (07:14 +0530)
committer오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 10 Dec 2018 01:44:09 +0000 (10:44 +0900)
This patch will add gtest to test quant8 datatype for NotEqual Op

Signed-off-by: shubham <shub98.gupta@samsung.com>
runtimes/tests/neural_networks_test/runtime_run_android_nn_test.skip.armv7l-linux
runtimes/tests/neural_networks_test/specs/Ex/notequal_ex_quant8.mod.py [new file with mode: 0644]

index 056ed4c..f4203b6 100644 (file)
@@ -11,6 +11,7 @@ GeneratedTests.lstm3_state2
 GeneratedTests.lstm3_state3
 GeneratedTests.lstm_state
 GeneratedTests.lstm_state2
+GeneratedTests.notequal*
 GeneratedTests.prelu_ex*
 GeneratedTests.svdf
 GeneratedTests.svdf2
diff --git a/runtimes/tests/neural_networks_test/specs/Ex/notequal_ex_quant8.mod.py b/runtimes/tests/neural_networks_test/specs/Ex/notequal_ex_quant8.mod.py
new file mode 100644 (file)
index 0000000..d5115a6
--- /dev/null
@@ -0,0 +1,18 @@
+# model
+model = Model()
+i1 = Input("op1", "TENSOR_QUANT8_ASYMM", "{3}, 1.f, 0") # a vector of input
+i2 = Input("op2", "TENSOR_QUANT8_ASYMM", "{3}, 1.f, 0") # a vector of input
+i3 = Output("op3", "TENSOR_QUANT8_ASYMM", "{3}, 1.f, 0") # a vector of output
+model = model.Operation("NOT_EQUAL_EX", i1, i2).To(i3)
+
+# Example 1. Input in operand 0,
+input0 = {i1: # input 0
+          [2, 3, 0],
+          i2: # input 1
+          [2, 9, 0]}
+
+output0 = {i3: # output 0
+           [0, 255, 0]}
+
+# Instantiate an example
+Example((input0, output0))