Simple implementation for LSTM
Hello everyone, I'm trying to implement a simple LSTM block using mkl-dnn. The implementation is described here :
A cell consists of three gates (input, forget, output), and a cell unit. Gates use a sigmoid activation, while input and cell state is often transformed with tanh. LSTM cell can be defined with a following set of equations:
Gates: it=g(Wxixt+Whiht−1+bi) ft=g(Wxfxt+Whfht−1+bf) ot=g(Wxoxt+Whoht−1+bo)
Input transform: c_int=tanh(Wxcxt+Whcht−1+bc_in)
State update: ct=ft⋅ct−1+it⋅c_int ht=ot⋅tanh(ct)
Is this fucntion supported in mkldnn? if it is the case could you please provide an example? (In the examples, I could only find an implementation of Vanilla_lstm. )
Thank you.
Hello @RadjaHachilif ,
What you describe is the exact definition of our vanilla_lstm cell. In our notations, we call c_int a gate too. You can find a few examples of how to create such an lstm cell here and here.
Thank you so much for your clarifications.