In assignment C5W1A3, the “Step 2: Loop through time steps” section says that using following formatting to retrieve hidden state and cell state.
next_hidden_state, _, next_cell_state = LSTM_cell(inputs=input_x, initial_state=[previous_hidden_state, previous_cell_state])
I read the documentation of TensorFlow LSTM layer in tf.keras.layers.LSTM | TensorFlow Core v2.6.0. It provide an example, when setting “return_state=True”, they use following code to retrieve return values.
whole_seq_output, final_memory_state, final_carry_state = lstm(inputs)
I could not find the description of thees three return values. So I guess that the first return value means prediction y in lecture, the second return value means hidden state, and the third return value means cell state.
But this is different from the usage in assignment, where the first return value means hidden state and the third return value means cell state.
I am confused about these two usages. Which one is correct?
Thank you.