0

I need to concat these tensors in the dimensions 2 and 3:

[<tf.Tensor 'one' shape=(3, 3, 15, 30) dtype=float32>, 
<tf.Tensor 'two' shape=(3, 3, 14, 29) dtype=float32>,
<tf.Tensor 'three' shape=(3, 3, 1, 1) dtype=float32>]

I know that in the space it makes no sense but I tried to to a reshape into:

[<tf.Tensor 'one' shape=(3, 3, xx) dtype=float32>, 
<tf.Tensor 'two' shape=(3, 3, yy) dtype=float32>,
<tf.Tensor 'three' shape=(3, 3, zz) dtype=float32>]

And then a concat:

[<tf.Tensor 'one' shape=(3, 3, xx+yy+zz) dtype=float32>]

Does it make sense? Anyone got some other idea?

1 Answers1

0

You can use tf.concat with axis parameter set to 2.

x = [tensor1, tensor2, tensor3]
tf.concat(x, axis=2)
merenptah
  • 476
  • 4
  • 15