当前位置: 代码迷 >> 综合 >> tf.broadcast_to()
  详细解决方案

tf.broadcast_to()

热度:6   发布时间:2024-02-22 05:04:30.0

tf.broadcast_to()

tf.broadcast_to()
将原始矩阵成倍增加
参数:

tf.broadcast_to(input,shape,name=None
)

使用案例:

import tensorflow as tfa = [[1, 2, 3], [4, 5, 6]]
b = [4, 6]
sess = tf.Session()
print(sess.run(tf.broadcast_to(a, b)))#[[1 2 3 1 2 3][4 5 6 4 5 6][1 2 3 1 2 3][4 5 6 4 5 6]]
  相关解决方案