# tf.keras.layers.RepeatVector

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/keras/layers/RepeatVector) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/layers/core.py#L608-L648) |

Repeats the input n times.

Inherits From: [`Layer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/layers/Layer)

#### 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), \`tf.compat.v2.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 />

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

<br />

#### Input shape:

2D tensor of shape `(num_samples, features)`.

#### Output shape:

3D tensor of shape `(num_samples, n, features)`.