I read the code of LSTM() and LSTMCell() of Keras on Github.
In the description of LSTMCell class, they say:
This class processes one step within the whole time sequence input, whereas tf.keras.layer.LSTM processes the whole sequence."
So does it mean that the use of LSTM() to process one time step in the exercise is wrong?
P/S: I found the same question in the discussion but it hasn’t been answered yet. So i posted another one.
Thank you for reading!
If “LSTM() does all that for you” were correct, I wonder why we still have to use for loop to step over each time step in the exercise (see djmodel() function).
After further examination, although LSTM() in the exercise indeed processes all timestep, we only feed it with 1 time step every for iteration. So I guess the use of LSTM() here is similar to LSTMCell(). Please correct me if I’m wrong. Thank you!