farizrahman4u / recurrentshop

Framework for building complex recurrent neural networks with Keras
MIT License
765 stars 218 forks source link

Fixed implementations for GRUCell and LSTMCell #104

Closed Pyrestone closed 6 years ago

Pyrestone commented 6 years ago

Fixed GRUCell and LSTMCell implementations to align with Literature and Keras counterparts.

See https://github.com/keras-team/keras/blob/master/keras/layers/recurrent.py#L1115 as well as https://en.wikipedia.org/wiki/Gated_recurrent_unit#Fully_gated_unit and https://en.wikipedia.org/wiki/Long_short-term_memory#LSTM_with_a_forget_gate

I also made sure they experimentally perform equivalent to the keras implementation. Previously they were underperforming Keras' convergence by a wide margin.

Pyrestone commented 6 years ago

Weirdly, github doesn't recognize that the past commits that were already merged, thus it claims 25 commits, while the actual diff is only the last 7

farizrahman4u commented 6 years ago

LGTM, Thanks!