# tf.keras.layers.RepeatVector

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v2.7.0/keras/layers/core/repeat_vector.py#L26-L65) |

Repeats the input n times.

Inherits From: [`Layer`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/keras/layers/Layer), [`Module`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/Module)

#### View aliases


**Compat aliases for migration**

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

[`tf.compat.v1.keras.layers.RepeatVector`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/RepeatVector)

<br />

    tf.keras.layers.RepeatVector(
        n, **kwargs
    )

#### Example:

    model = Sequential()
    model.add(Dense(32, input_dim=32))
    # now: model.output_shape == (None, 32)
    # note: `None` is the batch dimension

    model.add(RepeatVector(3))
    # now: model.output_shape == (None, 3, 32)

<br />

<br />

<br />

| ## Args ||
|---|---|
| `n` | Integer, repetition factor. |

<br />

Input shape: 2D tensor of shape `(num_samples, features)`.
Output shape: 3D tensor of shape `(num_samples, n, features)`.