1# model
2model = Model()
3i1 = Input("op1", "TENSOR_FLOAT32", "{1, 2, 2, 1}")
4i2 = Output("op2", "TENSOR_FLOAT32", "{1, 3, 3, 1}")
5h = Int32Scalar("height", 3) # an int32_t scalar bias
6w = Int32Scalar("width", 3)
7model = model.Operation("RESIZE_BILINEAR", i1, h, w).To(i2)
8
9# Example 1. Input in operand 0,
10input0 = {i1: # input 0
11          [1.0, 1.0, 2.0, 2.0]}
12output0 = {i2: # output 0
13           [1.0, 1.0, 1.0,
14            1.666666667, 1.666666667, 1.666666667,
15            2.0, 2.0, 2.0]}
16
17# Instantiate an example
18Example((input0, output0))
19