Home | History | Annotate | Download | only in V1_1
      1 model = Model()
      2 i1 = Input("input", "TENSOR_FLOAT32", "{2, 3}")
      3 begins = Parameter("begins", "TENSOR_INT32", "{2}", [0, 0])
      4 ends = Parameter("ends", "TENSOR_INT32", "{2}", [1, 3])
      5 strides = Parameter("strides", "TENSOR_INT32", "{2}", [1, 1])
      6 beginMask = Int32Scalar("beginMask", 0)
      7 endMask = Int32Scalar("endMask", 0)
      8 shrinkAxisMask = Int32Scalar("shrinkAxisMask", 1)
      9 
     10 output = Output("output", "TENSOR_FLOAT32", "{3}")
     11 
     12 model = model.Operation("STRIDED_SLICE", i1, begins, ends, strides, beginMask, endMask, shrinkAxisMask).To(output)
     13 
     14 # Example 1. Input in operand 0,
     15 input0 = {i1: # input 0
     16           [1, 2, 3, 4, 5, 6]}
     17 
     18 output0 = {output: # output 0
     19            [1, 2, 3]}
     20 
     21 # Instantiate an example
     22 Example((input0, output0))
     23