Versioned name: Range-1
Category: Generation
Short description: Range operation generates a sequence of numbers according input values [start, stop) with a step.
Attributes:
No attributes available.
Inputs:
- 1: "start" - If a value is not given then start = 0. A scalar of type T. Required.
- 2: "stop" - A scalar of type T. Required.
- 3: "step" - If a value is not given then step = 1. A scalar of type T. Required.
Outputs:
- 1: A tensor with type matching 2nd tensor.
Types
Detailed description:
Range operation generates a sequence of numbers starting from the value in the first input (start) up to but not including the value in the second input (stop) with a step equal to the value in the third input, according to the following formula:
Examples
Example 1: positive step
<layer ... type="Range">
<input>
<port id="0">
</port>
<port id="1">
</port>
<port id="2">
</port>
</input>
<output>
<port id="3">
<dim>7</dim>
</port>
</output>
</layer>
Example 2: negative step
<layer ... type="Range">
<input>
<port id="0">
</port>
<port id="1">
</port>
<port id="2">
</port>
</input>
<output>
<port id="3">
<dim>7</dim>
</port>
</output>
</layer>