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