How to concatenate two tensors horizontally in TensorFlow?

后端 未结 3 816
终归单人心
终归单人心 2021-02-14 22:20

I have 2 tensors of shape (100, 4) and (100, 2). I would like to perform a concatenation operation, in TensorFlow, similar to np.hstack,

3条回答
  •  执笔经年
    2021-02-14 22:43

    I have a similar problem. I try to concatenate two image Tensors with Keras. Tensor type and shape Both are identical but it says that Layer concatenate_X (The Number X changes)was called with an input that isn't a symbolic tensor. Received type: i try to concatenate them like this:

    X=concatenate([X1,X2],axis=-1)
    

提交回复
热议问题