阅读(755) (2)

TensorFlow函数教程:tf.keras.backend.repeat_elements

2019-03-21 17:02:26 更新

tf.keras.backend.repeat_elements函数

tf.keras.backend.repeat_elements(
    x,
    rep,
    axis
)

定义在:tensorflow/python/keras/backend.py。

沿着轴重复张量的元素,比如np.repeat。

如果x具有shape(s1, s2, s3),并且axis是1,则输出将具有shape(s1, s2 * rep, s3)。

参数:

  • x:张量或变量。
  • rep:Python整数,要重复的次数。
  • axis:沿着该轴进行重复。

返回:

返回张量。