karpathy / char-rnn

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

How can I change the model form LSTM to GRU? #230

Open Pluto-yiyi opened 4 years ago

Pluto-yiyi commented 4 years ago

Hi, I have run this code, and test successfully. But when I want to change the model to GRU, I can't finish it. I hope you can help me and give some suggests. Thank you very much! I change the code like this: 【train.py】 before: parser.add_argument('--model', type=str, default='lstm', help='lstm, rnn, gru, or nas') after:parser.add_argument('--model', type=str, default='gru', help='lstm, rnn, gru, or nas')