I created a LSTM model using the below code:
model = tensorflow1.keras.Sequential()
model.add(tensorflow1.keras.layers.LSTM(128, input_shape=(720, 4), return_sequences=True))
model.add(tensorflow1.keras.layers.LeakyReLU(alpha=0.5))
model.add(tensorflow1.keras.layers.LSTM(128, return_sequences=True))
model.add(tensorflow1.keras.layers.LeakyReLU(alpha=0.5))
model.add(tensorflow1.keras.layers.Dropout(0.3))
model.add(tensorflow1.keras.layers.LSTM(64, return_sequences=False))
model.add(tensorflow1.keras.layers.Dropout(0.3))
model.add(tensorflow1.keras.layers.Dense(1))
For the code model.add(tf.keras.layers.LSTM(128, input_shape=(720,4), return_sequences=True)), in my understanding, the code will have 128 LSTM output units, with an input shape of 720 time steps and 4 features. According to tensorflow keras documentation, units refers to "dimensionality of the output space". (https://www.tensorflow.org/api_docs/python/tf/keras/layers/LSTM)
My question is: Which of the 128 cells as output units out of the 720 cells will be selected as output cells? How does tensorflow choose which cells to select as an output?