sherjilozair / char-rnn-tensorflow

Multi-layer Recurrent Neural Networks (LSTM, RNN) for character-level language models in Python using Tensorflow
MIT License
2.64k stars 964 forks source link

Bidirectional RNN? #63

Open martiansideofthemoon opened 7 years ago

martiansideofthemoon commented 7 years ago

There should be an option to add a bidirectional recurrent neural network using the three core RNN cells.

ubergarm commented 7 years ago

I'm interested in this as well and have been reviewing your PR.

If possibly I'd like to split out the eval and perplexity stuff into its own PR, and merge that first.

Then given the recent refactoring if there is a way to get your bidirectional work integrated in a way that allows the existing models to work the same but turn on bidirectional with a CLI argument e.g. --model=bidirectional or similar. However I'm not familiar enough which combinations of models/cells/architectures require each other to work to have compatible CLI arguments.

So possibly it shouldl be --model=lstm --bidirectional=True or something like that?

laotao commented 6 years ago

@ubergarm I need this feature too. I'm using the model to do spell checking. It worked except for the first few chars. I think a bidirectional model will solve my problem.