tf.tile()用法及实例

tf.tile(  
    input,     #输入  
    multiples,  #某一维度上复制的次数  
    name=None  
)

实例

import tensorflow as tf
a = tf.tile([1,2,3],[2])
b = tf.tile([[1,2],
             [3,4],
             [5,6]],[2,3])
with tf.Session() as sess:
    print(sess.run(a))
    print(sess.run(b))

结果:

猜你喜欢

转载自blog.csdn.net/qq_33373858/article/details/82779219