summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/Ex/squared_difference_ex_3D_float.mod.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nnapi/specs/Ex/squared_difference_ex_3D_float.mod.py')
-rw-r--r--tests/nnapi/specs/Ex/squared_difference_ex_3D_float.mod.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/nnapi/specs/Ex/squared_difference_ex_3D_float.mod.py b/tests/nnapi/specs/Ex/squared_difference_ex_3D_float.mod.py
new file mode 100644
index 000000000..f91043636
--- /dev/null
+++ b/tests/nnapi/specs/Ex/squared_difference_ex_3D_float.mod.py
@@ -0,0 +1,20 @@
+# model
+model = Model()
+i1 = Input("op1", "TENSOR_FLOAT32", "{2, 2, 2}")
+i2 = Input("op2", "TENSOR_FLOAT32", "{2, 2, 2}")
+
+i3 = Output("op3", "TENSOR_FLOAT32", "{2, 2, 2}")
+model = model.Operation("SQUARED_DIFFERENCE_EX", i1, i2).To(i3)
+
+# Example 1. Input in operand 0,
+input0 = {i1: # input 0
+ [4.0, 7.8, 3.1432, 28.987456, 2.0, 10.8, 19.4212, 10.0],
+ i2: # input 1
+ [2.0, 3.2, 1.9856, 8.167952, 2.0, 4.4, 15.9856, 6.0]}
+
+output0 = {i3: # output 0
+ [4.0, 21.16, 1.34003776, 433.451746806016,
+ 0.0, 40.96, 11.80334736, 16.0]}
+
+# Instantiate an example
+Example((input0, output0))