To reshape data into 3D

I am creating BiLSTM model for predictin but I fail to fit the model using tensor flow, it need 3D and my data is 2D, Anyone know how to reshape data to 3D

Hi @Fatna_saeed, You can use tf.reshape( ) to covert 2d to 3d.

For example, I have 2d tensor defined as


#To convert it to 3d you can use tf.reshape and pass the tensor that you need to convert and add the desired shape


#or you can use tf.expand_dims 

tf.expand_dims(two_dim_tensor, axis=0) 

Thank You.