summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/V1_2/abs_1D_float_nnfw.mod.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nnapi/specs/V1_2/abs_1D_float_nnfw.mod.py')
-rwxr-xr-xtests/nnapi/specs/V1_2/abs_1D_float_nnfw.mod.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/nnapi/specs/V1_2/abs_1D_float_nnfw.mod.py b/tests/nnapi/specs/V1_2/abs_1D_float_nnfw.mod.py
new file mode 100755
index 000000000..6366f6e04
--- /dev/null
+++ b/tests/nnapi/specs/V1_2/abs_1D_float_nnfw.mod.py
@@ -0,0 +1,20 @@
+# model
+model = Model()
+
+i1 = Input("input", "TENSOR_FLOAT32", "{10}")
+i2 = Output("output", "TENSOR_FLOAT32", "{10}")
+model = model.Operation("ABS", i1).To(i2)
+
+# Example 1. Input in operand 0,
+input0 = {i1: # input 0
+ [0.778, -0.48, -241, 0.9118, -0.466,
+ -30.29, -0.4951, -0.4460, 0.555,
+ 0.11310]}
+
+output0 = {i2: # output 0
+ [0.778, 0.48, 241, 0.9118, 0.466,
+ 30.29, 0.4951, 0.4460, 0.555,
+ 0.11310]}
+
+# Instantiate an example
+Example((input0, output0))