summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/Ex/transpose_conv_ex_int_3.mod.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nnapi/specs/Ex/transpose_conv_ex_int_3.mod.py')
-rw-r--r--tests/nnapi/specs/Ex/transpose_conv_ex_int_3.mod.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/nnapi/specs/Ex/transpose_conv_ex_int_3.mod.py b/tests/nnapi/specs/Ex/transpose_conv_ex_int_3.mod.py
new file mode 100644
index 000000000..e44480968
--- /dev/null
+++ b/tests/nnapi/specs/Ex/transpose_conv_ex_int_3.mod.py
@@ -0,0 +1,27 @@
+# model
+model = Model()
+i0 = Input("op_shape", "TENSOR_INT32", "{4}")
+weights = Input("ker", "TENSOR_INT32", "{2, 3, 3, 1}")
+i1 = Input("in", "TENSOR_INT32", "{1, 2, 2, 1}" )
+pad = Int32Scalar("pad_valid", 2)
+s_x = Int32Scalar("stride_x", 2)
+s_y = Int32Scalar("stride_y", 2)
+i2 = Output("op", "TENSOR_INT32", "{1, 5, 5, 2}")
+model = model.Operation("TRANSPOSE_CONV_EX", i0, weights, i1, pad, s_x, s_y).To(i2)
+
+# Example 1. Input in operand 0,
+input0 = {i0: # output shape
+ [1, 5, 5, 2],
+ i1: # input 0
+ [1, 2, 3, 4],
+ weights: # input 1
+ [1, 3, 5, 7, 9, 11, 13, 15, 17, 2, 4, 6, 8, 10, 12, 14, 16, 18]}
+
+output0 = {i2: # output 0
+ [1, 2, 3, 4, 7, 10, 6, 8, 10, 12, 7, 8, 9,
+ 10, 25, 28, 18, 20, 22, 24, 16, 20, 24, 28, 62, 72,
+ 42, 48, 54, 60, 21, 24, 27, 30, 61, 68, 36, 40, 44,
+ 48, 39, 42, 45, 48, 103, 110, 60, 64, 68, 72]}
+
+# Instantiate an example
+Example((input0, output0))