summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/Ex/unpack_ex_3D_float_1.mod.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nnapi/specs/Ex/unpack_ex_3D_float_1.mod.py')
-rw-r--r--tests/nnapi/specs/Ex/unpack_ex_3D_float_1.mod.py53
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/nnapi/specs/Ex/unpack_ex_3D_float_1.mod.py b/tests/nnapi/specs/Ex/unpack_ex_3D_float_1.mod.py
new file mode 100644
index 000000000..e5cb38e4b
--- /dev/null
+++ b/tests/nnapi/specs/Ex/unpack_ex_3D_float_1.mod.py
@@ -0,0 +1,53 @@
+# Sample UnPack model, axis = 0
+model = Model()
+input = Input("input", "TENSOR_FLOAT32", "{3, 2, 3, 4}")
+axis = Int32Scalar("axis", 0)
+num_splits = Int32Scalar("num_splits", 3)
+out1 = Output("output1", "TENSOR_FLOAT32", "{2, 3, 4}")
+out2 = Output("output2", "TENSOR_FLOAT32", "{2, 3, 4}")
+out3 = Output("output3", "TENSOR_FLOAT32", "{2, 3, 4}")
+model = model.Operation("UNPACK_EX", input, num_splits, axis).To([out1, out2, out3])
+
+input0 = {input: # input 0
+ [0.0, 1.0, 2.0, 3.0,
+ 4.0, 5.0, 6.0, 7.0,
+ 8.0, 9.0, 10.0, 11.0,
+ 12.0, 13.0, 14.0, 15.0,
+ 16.0, 17.0, 18.0, 19.0,
+ 20.0, 21.0, 22.0, 23.0,
+ 24.0, 25.0, 26.0, 27.0,
+ 28.0, 29.0, 30.0, 31.0,
+ 32.0, 33.0, 34.0, 35.0,
+ 36.0, 37.0, 38.0, 39.0,
+ 40.0, 41.0, 42.0, 43.0,
+ 44.0, 45.0, 46.0, 47.0,
+ 48.0, 49.0, 50.0, 51.0,
+ 52.0, 53.0, 54.0, 55.0,
+ 56.0, 57.0, 58.0, 59.0,
+ 60.0, 61.0, 62.0, 63.0,
+ 64.0, 65.0, 66.0, 67.0,
+ 68.0, 69.0, 70.0, 71.0]}
+
+output0 = {out1: # output 0
+ [0.0, 1.0, 2.0, 3.0,
+ 4.0, 5.0, 6.0, 7.0,
+ 8.0, 9.0, 10.0, 11.0,
+ 12.0, 13.0, 14.0, 15.0,
+ 16.0, 17.0, 18.0, 19.0,
+ 20.0, 21.0, 22.0, 23.0],
+ out2: # output 1
+ [24.0, 25.0, 26.0, 27.0,
+ 28.0, 29.0, 30.0, 31.0,
+ 32.0, 33.0, 34.0, 35.0,
+ 36.0, 37.0, 38.0, 39.0,
+ 40.0, 41.0, 42.0, 43.0,
+ 44.0, 45.0, 46.0, 47.0],
+ out3: # output 2
+ [48.0, 49.0, 50.0, 51.0,
+ 52.0, 53.0, 54.0, 55.0,
+ 56.0, 57.0, 58.0, 59.0,
+ 60.0, 61.0, 62.0, 63.0,
+ 64.0, 65.0, 66.0, 67.0,
+ 68.0, 69.0, 70.0, 71.0]}
+# Instantiate an example
+Example((input0, output0))