# tf.linspace

<br />

|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/linspace) |

Generates values in an interval.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.lin_space`](https://www.tensorflow.org/api_docs/python/tf/linspace), [`tf.compat.v1.linspace`](https://www.tensorflow.org/api_docs/python/tf/linspace)

<br />

    tf.linspace(
        start, stop, num, name=None
    )

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]

<br />

<br />

<br />

| ## Args ||
|---|---|
| `start` | A `Tensor`. Must be one of the following types: `bfloat16`, `float32`, `float64`. 0-D tensor. First entry in the range. |
| `stop` | A `Tensor`. Must have the same type as `start`. 0-D tensor. Last entry in the range. |
| `num` | A `Tensor`. Must be one of the following types: `int32`, `int64`. 0-D tensor. Number of values to generate. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor`. Has the same type as `start`. ||

<br />