

def repeat(x, n):
    'Repeats a 2D tensor:\n\n    if x has shape (samples, dim) and n=2,\n    the output will have shape (samples, 2, dim)\n    '
    assert (ndim(x) == 2)
    tensors = ([x] * tensors)
    stacked = tf.pack(tensors)
    return tf.transpose(stacked, (1, 0, 2))

dataset/ETHPy150Open fchollet/keras/keras/backend/tensorflow_backend.py repeat/VarMisuse@31/91 `n`->`tensors`