1model = Model()
2i1 = Input("input", "TENSOR_FLOAT32", "{1, 2, 2, 1}")
3axis = Parameter("axis", "TENSOR_INT32", "{1}", [2])
4keepDims = Int32Scalar("keepDims", 0)
5output = Output("output", "TENSOR_FLOAT32", "{1, 2, 1}")
6
7model = model.Operation("MEAN", i1, axis, keepDims).To(output)
8
9# Example 1. Input in operand 0,
10input0 = {i1: # input 0
11          [1.0, 2.0,
12           3.0, 4.0]}
13
14output0 = {output: # output 0
15          [1.5,
16           3.5]}
17
18# Instantiate an example
19Example((input0, output0))
20