Course 5, week 2, assignment 2

I finished the assignment successfully but I am still trying to understand the LTSM parameters used. What is the difference between return_sequences=False and return_sequences=True? It is supposed to define if the returned output should be a single hidden state or a batch of sequences. But I am failing to grasp what this means.

1 Like

Dear @leonardo.pabon,


Provides a single output vector for the entire sequence, useful for sequence-to-vector tasks.


Produces a sequence of outputs, useful for stacking multiple recurrent layers or when the LSTM is followed by other recurrent layers in a sequence-to-sequence architecture.

1 Like

I think I’ve got it. So, does it control if something goes up in this diagram to the subsequent Dropout and LSTM layers?