I would like to train a RNN with LSTM cells in Tensorflow to predict the next word of a sequence. Words are N-length vectors of 0s and 1s. By looking at different tutorials, I saw that the input tensor has a shape like this

seq_input = tf.placeholder(tf.float32, [n_steps, batch_size, seq_width])

However, it is not clear to me what these shapes represent. How do I reshape my input words to match this shape?

  • 1
    $\begingroup$ Welcome to CS.SE! 1. It might help to edit to link to one of the tutorials that has this. 2. I don't know if you're going to get any good answers here on CS.SE, because we tend to be focused more on concepts and algorithms than on code or specific libraries. I suspect you'd be more likely to get a good answer on Stack Overflow. Would you be happy with us migrating this question to Stack Overflow? $\endgroup$ – D.W. Jan 12 '17 at 16:55
  • $\begingroup$ @D.W. Or even datascience.se. $\endgroup$ – Yuval Filmus Jan 12 '17 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.