Creates a new tf.Tensor1D filled with the numbers in the range provided.
tf.Tensor1D
The tensor is a half-open interval meaning it includes start, but excludes stop. Decrementing ranges and negative step values are also supported.
tf.range(0, 9, 2).print(); Copy
tf.range(0, 9, 2).print();
An integer start value
An integer stop value
Optional
An integer increment (will default to 1 or -1)
The data type of the output tensor. Defaults to 'float32'.
Generated using TypeDoc
Creates a new
tf.Tensor1D
filled with the numbers in the range provided.The tensor is a half-open interval meaning it includes start, but excludes stop. Decrementing ranges and negative step values are also supported.