summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/Ex/sqrt_ex_1D_float.mod.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nnapi/specs/Ex/sqrt_ex_1D_float.mod.py')
-rw-r--r--tests/nnapi/specs/Ex/sqrt_ex_1D_float.mod.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/nnapi/specs/Ex/sqrt_ex_1D_float.mod.py b/tests/nnapi/specs/Ex/sqrt_ex_1D_float.mod.py
new file mode 100644
index 000000000..fa6a01c54
--- /dev/null
+++ b/tests/nnapi/specs/Ex/sqrt_ex_1D_float.mod.py
@@ -0,0 +1,15 @@
+# model
+model = Model()
+i1 = Input("op1", "TENSOR_FLOAT32", "{4}") # a vector of input
+i2 = Output("op2", "TENSOR_FLOAT32", "{4}") # a vector of output
+model = model.Operation("SQRT_EX", i1).To(i2)
+
+# Example 1. Input in operand 0,
+input0 = {i1: # input 0
+ [62.0, 5.0, 73.0, 34.0]}
+
+output0 = {i2: # output 0
+ [7.87400787, 2.23606798, 8.54400375, 5.83095189]}
+
+# Instantiate an example
+Example((input0, output0))