Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / tests / nnapi / specs / V1_2 / split_4D_int32_3_nnfw.mod.py
1 # model
2 model = Model()
3 i1 = Input("op1", "TENSOR_INT32", "{2,2,2,2}")
4 axis = Int32Scalar("axis", 2)
5 num_out = Int32Scalar("num_out", 2)
6 i2 = Output("op2", "TENSOR_INT32", "{2,2,1,2}")
7 i3 = Output("op3", "TENSOR_INT32", "{2,2,1,2}")
8 model = model.Operation("SPLIT", i1, axis, num_out).To([i2, i3])
9
10 # Example 1. Input in operand 0,
11 input0 = {i1: # input 0
12           [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]}
13
14 output0 = {
15     i2: # output 0
16           [1, 2, 5, 6, 9, 10, 13, 14],
17     i3: # output 1
18             [3, 4, 7, 8, 11, 12, 15, 16]}
19
20 # Instantiate an example
21 Example((input0, output0))