tf.concat(
values,
axis,
name='concat'
)
沿一维串联张量。沿着维度axis连接张量列表values。...例:
import tensorflow as tf
t1 = [[1, 2, 3], [4, 5, 6]]
t2 = [[7, 8, 9], [10, 11, 12]]
t3=tf.concat([...t1, t2], 0) # [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]
t4=tf.concat([t1, t2], 1) # [[1, 2, 3...([t1, t2], 0)) # [4, 3]
t4_shape = tf.shape(tf.concat([t1, t2], 1)) # [2, 6]
with tf.Session() as...]
[10 11 12]]
[[ 1 2 3 7 8 9]
[ 4 5 6 10 11 12]]
[4 3]
[2 6]
----------------------
在Python中,