📜  什么是 tf.repeat() - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:52.456000             🧑  作者: Mango

代码示例1
# An N -dimensional Tensor. repeats. An 1-D int Tensor. The number of repetitions for each element. repeats is broadcasted to fit the shape of the given axis.

repeat(['a', 'b', 'c'], repeats=[3, 0, 2], axis=0)

# Result

numpy=array([b'a', b'a', b'a', b'c', b'c'], dtype=object)>