• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# model
2model = Model()
3
4i1 = Input("input", "TENSOR_QUANT8_ASYMM", "{1, 4}, 0.5f, 0") # batch = 1, depth = 1
5beta = Float32Scalar("beta", 0.00001) # close to 0
6output = Output("output", "TENSOR_QUANT8_ASYMM", "{1, 4}, 0.00390625f, 0")
7
8# model 1
9model = model.Operation("SOFTMAX", i1, beta).To(output)
10
11# Example 1. Input in operand 0,
12input0 = {i1: [1, 2, 10, 20]}
13
14output0 = {output: [64, 64, 64, 64]}
15
16# Instantiate an example
17Example((input0, output0))
18