Dense和TimeDistributedDense,哪一个适合Keras中LSTM层之后?
例如,
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)
我读了一些文章,其中大部分使用了 Dense,但也有一些使用了 TimeDistributedDense。我希望知道理论上什么是正确的。