Dense and TimeDistributedDense, which one is suitable after LSTM layer in Keras?
input = Input(shape=(12,N_indepen), dtype='float32', name='inci_input') lstm = Bidirectional(LSTM(100, activation='elu',return_sequences=False))(input) # Dense? or TimeDistributedDense? dense = layers.Dense(30, activation='elu')(lstm) dense = layers.TimeDistributedDense(30, activation='elu')(lstm) m_y = layers.Dense(1, activation='linear')(dense)
I read some articles, most of them used Dense, but some used TimeDistributedDense. I hope to know what is proper theoretically.