summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/V1_2/logical_and_broadcast_4D_2D_nnfw.mod.py
blob: 1a2b5bedc1fce7742f9f0a95a51e8561af443b41 (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_BOOL8", "{2, 2, 2, 2}")
i2 = Input("op2", "TENSOR_BOOL8", "{2, 2}")

i3 = Output("op3", "TENSOR_BOOL8", "{2, 2, 2, 2}")
model = model.Operation("LOGICAL_AND", i1, i2).To(i3)

# Example 1. Input in operand 0,
input0 = {i1: # input 0
          [False, False, True, True,
           True, True, False, False,
	         False, False, False, False,
	         True, True, True, True],
          i2: # input 1
          [False, True, False, True]}

output0 = {i3: # output 0
          [False, False, False, True,
	         False, True, False, False,
	         False, False, False, False,
	         False, True, False, True]}

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