• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1model = Model()
2i1 = Input("input", "TENSOR_FLOAT16", "{1, 2, 2, 1}")
3perms = Parameter("perms", "TENSOR_INT32", "{4}", [0, 2, 1, 3])
4output = Output("output", "TENSOR_FLOAT16", "{1, 2, 2, 1}")
5
6model = model.Operation("TRANSPOSE", i1, perms).To(output)
7
8# Example 1. Input in operand 0,
9input0 = {i1: # input 0
10          [1.0, 2.0,
11           3.0, 4.0]}
12
13output0 = {output: # output 0
14          [1.0, 3.0,
15           2.0, 4.0]}
16
17# Instantiate an example
18Example((input0, output0))
19