1model = Model()
2i1 = Input("input", "TENSOR_FLOAT32", "{1, 2, 2, 8}")
3block = Int32Scalar("block_size", 2)
4output = Output("output", "TENSOR_FLOAT32", "{1, 4, 4, 2}")
5
6model = model.Operation("DEPTH_TO_SPACE", i1, block).To(output)
7
8# Example 1. Input in operand 0,
9
10input0 = {i1: # input 0
11           [10,   20,  11,  21, 14,   24,  15,  25,
12            12,   22,  13,  23, 16,   26,  17,  27,
13            18,   28,  19,  29, 112, 212, 113, 213,
14            110, 210, 111, 211, 114, 214, 115, 215]}
15
16output0 = {output: # output 0
17          [10,   20,  11,  21,  12,  22, 13,   23,
18           14,   24,  15,  25,  16,  26, 17,   27,
19           18,   28,  19,  29, 110, 210, 111, 211,
20          112,  212, 113, 213, 114, 214, 115, 215]}
21# Instantiate an example
22Example((input0, output0))
23