LSTM Memory Network: Gated Recurrent Memory Cell - Coding problem | OneNoughtOne