TensorFlow 2.0 Beta is available Learn more

tf.keras.backend.repeat

TensorFlow 2.0 version View source on GitHub

Repeats a 2D tensor.

Aliases:

  • tf.compat.v1.keras.backend.repeat
  • tf.compat.v2.keras.backend.repeat
tf.keras.backend.repeat(
    x,
    n
)

if x has shape (samples, dim) and n is 2, the output will have shape (samples, 2, dim).

Arguments:

  • x: Tensor or variable.
  • n: Python integer, number of times to repeat.

Returns:

A tensor.