keras-cn
keras-cn copied to clipboard
如何获取LSTM隐含层的状态?
Not really an issue, but I haven't found any documentation on how to access the hidden state in LSTM RNN. Context: I want to capture the semantic meaning of a sentence, by feeding in the Glove word embedding vectors ( https://github.com/fchollet/keras/blob/master/examples/pretrained_word_embeddings.py ) into the RNN and when the sentence ends, the final hidden state captures the so-called sentence embedding. I want to access this vector obtained from the final hidden state.
@460130107 Have you tried the methods given by FAQ?
LSTM return 里有参数可以 返回所有隐藏层的数据