summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/V1_2/neg_3D_int_nnfw.mod.py
blob: d3e1e435b0a369dc4c78f8a018c6fa3193dc23bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# model
model = Model()
i1 = Input("op1", "TENSOR_INT32", "{2,3,4}")
i2 = Output("op2", "TENSOR_INT32", "{2,3,4}")
model = model.Operation("NEG", i1).To(i2)

# Example 1. Input in operand 0,
input0 = {i1: # input 0
          [3, 4, 5, 6,
           7, 8, 9, 1,
           2, 18, 19, 11,
	   40, 42, 4, 12,
	   22, 32, 62, 52,
	   92, 59, 69, 312]}

output0 = {i2: # output 0
          [-3, -4, -5, -6,
          -7, -8, -9, -1,
          -2, -18, -19, -11,
          -40, -42, -4, -12,
	  -22, -32, -62, -52,
	  -92, -59, -69, -312]}

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