Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / tests / nnapi / specs / V1_2 / sqrt_4D_float_nnfw.mod.py
1 # model
2 model = Model()
3 i1 = Input("op1", "TENSOR_FLOAT32", "{2, 2, 2, 2}")
4 i2 = Output("op2", "TENSOR_FLOAT32", "{2, 2, 2, 2}")
5 model = model.Operation("SQRT", i1).To(i2)
6
7 # Example 1. Input in operand 0,
8 input0 = {i1: # input 0
9            [36, 90, 43, 36, 2, 22, 19, 10, 9, 80, 40, 90, 15, 56, 18, 12]}
10 output0 = {i2: # output 0
11            [6.0, 9.48683298, 6.55743852, 6.0, 1.41421356, 4.69041576, 4.35889894, 3.16227766,
12             3.0, 8.94427191, 6.32455532, 9.48683298, 3.87298335, 7.48331477, 4.24264069, 3.46410162]}
13 # Instantiate an example
14 Example((input0, output0))