diff options
author | Chunseok Lee <chunseok.lee@samsung.com> | 2019-01-08 17:36:34 +0900 |
---|---|---|
committer | Chunseok Lee <chunseok.lee@samsung.com> | 2019-01-08 17:36:34 +0900 |
commit | bd11b24234d7d43dfe05a81c520aa01ffad06e42 (patch) | |
tree | 57d0d4044977e4fa0e50cd9ba40b32006dff19eb /tests/nnapi/specs/Ex/transpose_conv_ex_float_1.mod.py | |
parent | 91f4ba45449f700a047a4aeea00b1a7c84e94c75 (diff) | |
download | nnfw-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_float_1.mod.py')
-rw-r--r-- | tests/nnapi/specs/Ex/transpose_conv_ex_float_1.mod.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/nnapi/specs/Ex/transpose_conv_ex_float_1.mod.py b/tests/nnapi/specs/Ex/transpose_conv_ex_float_1.mod.py new file mode 100644 index 000000000..82b59c3cf --- /dev/null +++ b/tests/nnapi/specs/Ex/transpose_conv_ex_float_1.mod.py @@ -0,0 +1,30 @@ +# model +model = Model() +i0 = Input("op_shape", "TENSOR_INT32", "{4}") +weights = Input("ker", "TENSOR_FLOAT32", "{1, 3, 3, 1}") +i1 = Input("in", "TENSOR_FLOAT32", "{1, 4, 4, 1}" ) +pad = Int32Scalar("pad_same", 1) +s_x = Int32Scalar("stride_x", 1) +s_y = Int32Scalar("stride_y", 1) +i2 = Output("op", "TENSOR_FLOAT32", "{1, 4, 4, 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, 4, 4, 1], + i1: # input 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], + weights: # input 1 + [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]} + +output0 = {i2: # output 0 + [29.0, 62.0, 83.0, 75.0, + 99.0, 192.0, 237.0, 198.0, + 207.0, 372.0, 417.0, 330.0, + 263.0, 446.0, 485.0, 365.0]} + +# Instantiate an example +Example((input0, output0)) |