summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/Ex/transpose_conv_ex_int_2.mod.py
diff options
context:
space:
mode:
authorChunseok Lee <chunseok.lee@samsung.com>2019-01-08 17:36:34 +0900
committerChunseok Lee <chunseok.lee@samsung.com>2019-01-08 17:36:34 +0900
commitbd11b24234d7d43dfe05a81c520aa01ffad06e42 (patch)
tree57d0d4044977e4fa0e50cd9ba40b32006dff19eb /tests/nnapi/specs/Ex/transpose_conv_ex_int_2.mod.py
parent91f4ba45449f700a047a4aeea00b1a7c84e94c75 (diff)
downloadnnfw-bd11b24234d7d43dfe05a81c520aa01ffad06e42.tar.gz
nnfw-bd11b24234d7d43dfe05a81c520aa01ffad06e42.tar.bz2
nnfw-bd11b24234d7d43dfe05a81c520aa01ffad06e42.zip
Imported Upstream version 0.3upstream/0.3
Diffstat (limited to 'tests/nnapi/specs/Ex/transpose_conv_ex_int_2.mod.py')
-rw-r--r--tests/nnapi/specs/Ex/transpose_conv_ex_int_2.mod.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/nnapi/specs/Ex/transpose_conv_ex_int_2.mod.py b/tests/nnapi/specs/Ex/transpose_conv_ex_int_2.mod.py
new file mode 100644
index 000000000..9bf4b113d
--- /dev/null
+++ b/tests/nnapi/specs/Ex/transpose_conv_ex_int_2.mod.py
@@ -0,0 +1,25 @@
+# model
+model = Model()
+i0 = Input("op_shape", "TENSOR_INT32", "{4}")
+weights = Input("ker", "TENSOR_INT32", "{1, 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, 1}")
+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, 1],
+ i1: # input 0
+ [1, 2, 3, 4],
+ weights: # input 1
+ [1, 2, 3, 4, 5, 6, 7, 8, 9]}
+
+output0 = {i2: # output 0
+ [1, 2, 5, 4, 6, 4, 5, 14, 10, 12, 10, 14, 36,
+ 24, 30, 12, 15, 34, 20, 24, 21, 24, 55, 32, 36]}
+
+# Instantiate an example
+Example((input0, output0))