karpathy / char-rnn

Multi-layer Recurrent Neural Networks (LSTM, GRU, RNN) for character-level language models in Torch
11.53k stars 2.58k forks source link

LSTM weight sharing along the time dimension #185

Closed ytoon closed 7 years ago

ytoon commented 7 years ago

I have a quetion about the LSTM weight sharing along the time dimension.

https://github.com/karpathy/char-rnn/blob/master/model/LSTM.lua#L30 https://github.com/karpathy/char-rnn/blob/master/model/LSTM.lua#L31

With the codes reallocate two new Linear NN for one time layer, it's inconsistent with LSTM mechanism that the LSTM shares weights along the time dimension.