# tf.contrib.layers.repeat

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/layers/python/layers/layers.py#L2577-L2620) |

Applies the same layer with the same arguments repeatedly.

    tf.contrib.layers.repeat(
        inputs, repetitions, layer, *args, **kwargs
    )

      y = repeat(x, 3, conv2d, 64, [3, 3], scope='conv1')
      # It is equivalent to:

      x = conv2d(x, 64, [3, 3], scope='conv1/conv1_1')
      x = conv2d(x, 64, [3, 3], scope='conv1/conv1_2')
      y = conv2d(x, 64, [3, 3], scope='conv1/conv1_3')

If the `scope` argument is not given in `kwargs`, it is set to
`layer.__name__`, or `layer.func.__name__` (for `functools.partial`
objects). If neither `__name__` nor `func.__name__` is available, the
layers are called with `scope='stack'`.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `inputs` | A `Tensor` suitable for layer. |
| `repetitions` | Int, number of repetitions. |
| `layer` | A layer with arguments `(inputs, *args, **kwargs)` |
| `*args` | Extra args for the layer. |
| `**kwargs` | Extra kwargs for the layer. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor result of applying the layer, repetitions times. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If the op is unknown or wrong. |

<br />