tf.lin_space
tf.lin_space
tf.lin_space
tf.linspace
lin_space( start, stop, num, name=None )
Defined in tensorflow/python/ops/gen_math_ops.py
.
See the guide: Constants, Sequences, and Random Values > Sequences
Generates values in an interval.
A sequence of num
evenly-spaced values are generated beginning at start
. If num > 1
, the values in the sequence increase by stop - start / num - 1
, so that the last one is exactly stop
.
For example:
tf.linspace(10.0, 12.0, 3, name="linspace") => [ 10.0 11.0 12.0]
Args:
-
start
: ATensor
. Must be one of the following types:float32
,float64
. First entry in the range. -
stop
: ATensor
. Must have the same type asstart
. Last entry in the range. -
num
: ATensor
. Must be one of the following types:int32
,int64
. Number of values to generate. -
name
: A name for the operation (optional).
Returns:
A Tensor
. Has the same type as start
. 1-D. The generated values.
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/lin_space