summaryrefslogtreecommitdiff
path: root/runtimes/tests/neural_networks_test/specs/V1_1/transpose.mod.py
diff options
context:
space:
mode:
Diffstat (limited to 'runtimes/tests/neural_networks_test/specs/V1_1/transpose.mod.py')
-rw-r--r--runtimes/tests/neural_networks_test/specs/V1_1/transpose.mod.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/runtimes/tests/neural_networks_test/specs/V1_1/transpose.mod.py b/runtimes/tests/neural_networks_test/specs/V1_1/transpose.mod.py
new file mode 100644
index 000000000..49f15a7cb
--- /dev/null
+++ b/runtimes/tests/neural_networks_test/specs/V1_1/transpose.mod.py
@@ -0,0 +1,18 @@
+model = Model()
+i1 = Input("input", "TENSOR_FLOAT32", "{1, 2, 2, 1}")
+perms = Parameter("perms", "TENSOR_INT32", "{4}", [0, 2, 1, 3])
+output = Output("output", "TENSOR_FLOAT32", "{1, 2, 2, 1}")
+
+model = model.Operation("TRANSPOSE", i1, perms).To(output)
+
+# Example 1. Input in operand 0,
+input0 = {i1: # input 0
+ [1.0, 2.0,
+ 3.0, 4.0]}
+
+output0 = {output: # output 0
+ [1.0, 3.0,
+ 2.0, 4.0]}
+
+# Instantiate an example
+Example((input0, output0))