I have a list of sentences as of word embeddings. So every sentence is a matrix in 16*300, so it is a 2d tensor. I want to connect them to a 3d tensor and use this 3d tensor as input for a CNN model. Unfortunately, I cannot get it into this 3d tensor.
In my opinion, at least connecting two of these 2d tensors to a smaller 3d tensor via tf.concat should work. Unfortunately, I get the following error message
tf.concat(0, [Tweets_final.Text_M[0], Tweets_final.Text_M[1]])
ValueError: Shape (3, 16, 300) must have rank 0
If it works with two 2d tensors I would probably work with one loop
One of these 2d tensors in the list looks like this one:
<tf.Tensor: shape=(16, 300), dtype=float32, numpy= array([[-0.03571776, 0.07699937, -0.02208528, ..., 0.00873246,
-0.05967658, -0.03735098],
[-0.03044251, 0.050944 , -0.02236165, ..., -0.01745957,
0.01311598, 0.01744673],
[ 0. , 0. , 0. , ..., 0. ,
0. , 0. ],
...,
[ 0. , 0. , 0. , ..., 0. ,
0. , 0. ],
[ 0. , 0. , 0. , ..., 0. ,
0. , 0. ],
[ 0. , 0. , 0. , ..., 0. ,
0. , 0. ]], dtype=float32)>