tree: 773efe413cc1820bb663a264a8532da0b0d1105e [path history] [tgz]
  1. infer_sort.py
  2. lstm.py
  3. lstm_sort.py
  4. README.md
  5. rnn_model.py
  6. sort_io.py
example/bi-lstm-sort/README.md

This is an example of using bidirection lstm to sort an array.

Firstly, generate data by:

cd data
python gen_data.py

Then, train the model by:

python lstm_sort.py

At last, test model by:

python infer_sort.py 234 189 785 763 231

and will output sorted seq

189
231
234
763
785