I want to merge two tensors a
and b
into c
. What I've tried is:
But my expectation is c = [1, 2, 3, 4, 5, 6]
. How can I get it?
tf.stack
concatenate the given tensors along a new dimension. If you want to concatenate across an existing dimension, use tf.concat
:
c = tf.concat([a, b], axis=0)