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