summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/V1_1/transpose_2D_nnfw.mod.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nnapi/specs/V1_1/transpose_2D_nnfw.mod.py')
-rw-r--r--tests/nnapi/specs/V1_1/transpose_2D_nnfw.mod.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/nnapi/specs/V1_1/transpose_2D_nnfw.mod.py b/tests/nnapi/specs/V1_1/transpose_2D_nnfw.mod.py
new file mode 100644
index 000000000..2397aa0d7
--- /dev/null
+++ b/tests/nnapi/specs/V1_1/transpose_2D_nnfw.mod.py
@@ -0,0 +1,16 @@
+model = Model()
+i1 = Input("input", "TENSOR_FLOAT32", "{3,4}")
+perms = Parameter("perms", "TENSOR_INT32", "{2}", [1, 0])
+output = Output("output", "TENSOR_FLOAT32", "{4,3}")
+
+model = model.Operation("TRANSPOSE", i1, perms).To(output)
+
+# Example 1. Input in operand 0,
+input0 = {i1: # input 0
+ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}
+
+output0 = {output: # output 0
+ [0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11]}
+
+# Instantiate an example
+Example((input0, output0))