summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/V1_2/rsqrt_3D_float_nnfw.mod.py
blob: 084e02020c3228085f0d759b23670207956e5f3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# model
model = Model()

i1 = Input("op1", "TENSOR_FLOAT32", "{2, 2, 2}")
i3 = Output("op3", "TENSOR_FLOAT32", "{2, 2, 2}")
model = model.Operation("RSQRT", i1).To(i3)

# Example 1. Input in operand 0,
input0 = {i1: # input 0
          [1.0, 36.0, 2.0, 90, 4.0, 43.0, 8.0, 36.0]}

output0 = {i3: # output 0
           [1.0, 0.166667, 0.70710678118, 0.105409, 0.5, 0.152499, 0.35355339059, 0.166667]}

# Instantiate an example
Example((input0, output0))