|
|
9 年之前 | |
|---|---|---|
| .. | ||
| README.md | 9 年之前 | |
| data_utils.py | 9 年之前 | |
| neural_gpu.py | 9 年之前 | |
| neural_gpu_trainer.py | 9 年之前 | |
Code for the Neural GPU model as described in [[http://arxiv.org/abs/1511.08228]].
Requirements:
The model can be trained on the following algorithmic tasks:
sort - Sort a decimal listkvsort - Sort decimal keys in dictionaryid - Return the same decimal listrev - Reverse a decimal listrev2 - Reverse a decimal dictionary by keyincr - Add one to a decimaladd - Long decimal additionleft - First decimal in listright - Last decimal in listleft-shift - Left shift a decimal listright-shift - Right shift a decimal listbmul - Long binary multiplicationmul - Long decimal multiplicationdup - Duplicate a decimal list with paddingbadd - Long binary additionqadd - Long quaternary additionsearch - Search for decimal key in dictionaryTo train the model on the reverse task run:
python neural_gpu_trainer.py --task=rev
While training, interim / checkpoint model parameters will be
written to /tmp/neural_gpu/.
Once the amount of error gets down to what you're comfortable
with, hit Ctrl-C to stop the training process. The latest
model parameters will be in /tmp/neural_gpu/neural_gpu.ckpt-<step>
and used on any subsequent run.
To test a trained model on how well it decodes run:
python neural_gpu_trainer.py --task=rev --mode=1
To produce an animation of the result run:
python neural_gpu_trainer.py --task=rev --mode=1 --animate=True
Maintained by Lukasz Kaiser (lukaszkaiser)