Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / tests / nnapi / specs / V1_1 / transpose_2D_nnfw.mod.py
1 model = Model()
2 i1 = Input("input", "TENSOR_FLOAT32", "{3,4}")
3 perms = Parameter("perms", "TENSOR_INT32", "{2}", [1, 0])
4 output = Output("output", "TENSOR_FLOAT32", "{4,3}")
5
6 model = model.Operation("TRANSPOSE", i1, perms).To(output)
7
8 # Example 1. Input in operand 0,
9 input0 = {i1: # input 0
10           [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}
11
12 output0 = {output: # output 0
13           [0, 4, 8, 1, 5, 9, 2,  6, 10,  3,  7, 11]}
14
15 # Instantiate an example
16 Example((input0, output0))