Skip to content Skip to sidebar Skip to footer

Tensorflow Valueerror: Shapes (?, 1) And (?,) Are Incompatible

I'm facing this error when running my code with 3 lstm layers. Not sure how to fix it. Can anyone help. Here MAX_SEQUENCE_LENGTH=250. After running the cost function, i get the err

Solution 1:

I know this question is a month-old.

I was facing this issue some days ago. It was a well-known bug even though they solved only for that specific case.

In your case, the only working solution I found is to modify:

y = tf.placeholder(tf.int32, [None])

in:

y = tf.placeholder(tf.int32, [None, 1])

Post a Comment for "Tensorflow Valueerror: Shapes (?, 1) And (?,) Are Incompatible"