liquidcarrot / carrot

🥕 Evolutionary Neural Networks in JavaScript
https://liquidcarrot.io/carrot/
MIT License
293 stars 34 forks source link

Can I get the H and C states of the LSTM? #252

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi. I wish to build encoder and decoder model, but I don't know where the H and C states of the encoder are, and how to use them as the initial state of the decoder?

Pseudocode:
[outputs, stateH, stateC] = LSTM()
[outputs] = LSTM(initial_state=[stateH, stateC])

It is sad that many of the lightweight neural network libs are no longer maintained. I have looked for the relevant libs, but none of them provide this feature. The encoder and decoder models only seem to find example code on extremely large libs like tensorflow or keras.

Thank you