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

i1 = Input("input", "TENSOR_QUANT8_ASYMM", "{1, 4}, 0.5f, 0") # batch = 1, depth = 1
beta = Float32Scalar("beta", 0.00001) # close to 0
output = Output("output", "TENSOR_QUANT8_ASYMM", "{1, 4}, 0.00390625f, 0")

# model 1
model = model.Operation("SOFTMAX", i1, beta).To(output)

# Example 1. Input in operand 0,
input0 = {i1: [1, 2, 10, 20]}

output0 = {output: [64, 64, 64, 64]}

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