Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / tests / nnapi / specs / Ex / round_ex_4D_float.mod.py
1 # model
2 model = Model()
3 i1 = Input("op1", "TENSOR_FLOAT32", "{2, 1, 1, 6}")
4 i2 = Output("op2", "TENSOR_FLOAT32", "{2, 1, 1, 6}")
5 model = model.Operation("ROUND_EX", i1).To(i2)
6
7 # Example 1. Input in operand 0,
8 input0 = {i1: # input 0
9           [0.001, 8.001, 0.999, 9.999, 0.5, -0.001, -8.001,
10                       -0.999, -9.999, -0.5, -2.5, 1.5]}
11
12 output0 = {i2: # output 0
13            [0.0, 8.0, 1.0, 10.0, 0.0, 0.0, -8.0, -1.0, -10.0, -0.0, -2.0, 2.0]}
14
15 # Instantiate an example
16 Example((input0, output0))