# What are the output shape of LSTM with “return_sequences” equal to “True” or “False”?

What are the output shape of LSTM with Keras implementation when "return_sequences" equals to "True" or "False" ?

Assuming your output state size is h. You will generate nxh for n data points if return_sequences is false. On the other hand you would be having nxtxh dimensional array as output if return_sequences is set to true. Here t is the number of timestamps in each data point.
• So choosing return_sequences = True/False doesn't change the 3D array output shape? – user145959 Mar 2 '19 at 11:08
• Aha, you meant one dimension vector by h. – user145959 Mar 2 '19 at 13:37