https://www.tensorflow.org/versions/r0.12/api_docs/python/array_ops.html#concat

例子:

t1 = [[1, 2, 3], [4, 5, 6]]
t2 = [[7, 8, 9], [10, 11, 12]]
tf.concat(0, [t1, t2]) ==> [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]
tf.concat(1, [t1, t2]) ==> [[1, 2, 3, 7, 8, 9], [4, 5, 6, 10, 11, 12]]

# tensor t3 with shape [2, 3]
# tensor t4 with shape [2, 3]
tf.shape(tf.concat(0, [t3, t4])) ==> [4, 3]
tf.shape(tf.concat(1, [t3, t4])) ==> [2, 6]

 

相关文章:

  • 2021-12-16
  • 2021-06-22
  • 2021-06-07
  • 2021-10-27
  • 2022-03-08
  • 2021-12-25
  • 2021-10-06
  • 2022-12-23
猜你喜欢
  • 2021-12-01
  • 2021-12-28
  • 2021-08-17
  • 2021-07-13
  • 2021-06-27
  • 2021-10-24
  • 2022-12-23
相关资源
相似解决方案