summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/V1_2/neg_1D_float_nnfw.mod.py
blob: 6791f2b5efeda94252b7e8b4161681118470dd31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# model
model = Model()
i1 = Input("op1", "TENSOR_FLOAT32", "{4}") # a vector of input
i2 = Output("op2", "TENSOR_FLOAT32", "{4}") # a vector of output
model = model.Operation("NEG", i1).To(i2)

# Example 1. Input in operand 0,
input0 = {i1: # input 0
          [3.0, 4.0, 5.0, 6.0]}

output0 = {i2: # output 0
           [-3.0, -4.0, -5.0, -6.0]}

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