Skip to content

Commit b1ad92b

Browse files
committed
Update neural_gpu documentation.
* Add list of algorithmic tasks. * Detail what is stored in /tmp/neural_gpu/ (default location). * Detail that one should hit Ctrl-C to stop the training process. * Add sections around decoding and animation, but couldn't get those to work myself. Still worth having in the docs.
1 parent f8cc1ea commit b1ad92b

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

neural_gpu/README.md

+45-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,50 @@ Requirements:
66
* TensorFlow (see tensorflow.org for how to install)
77
* Matplotlib for Python (sudo apt-get install python-matplotlib)
88

9-
Run: python neural_gpu_trainer.py --task=rev
9+
The model can be trained on the following algorithmic tasks:
10+
11+
* `sort` - Sort a decimal list
12+
* `kvsort` - Sort decimal keys in dictionary
13+
* `id` - Return the same decimal list
14+
* `rev` - Reverse a decimal list
15+
* `rev2` - Reverse a decimal dictionary by key
16+
* `incr` - Add one to a decimal
17+
* `add` - Long decimal addition
18+
* `left` - First decimal in list
19+
* `right` - Last decimal in list
20+
* `left-shift` - Left shift a decimal list
21+
* `right-shift` - Right shift a decimal list
22+
* `bmul` - Long binary multiplication
23+
* `mul` - Long decimal multiplication
24+
* `dup` - Duplicate a decimal list with padding
25+
* `badd` - Long binary addition
26+
* `qadd` - Long quaternary addition
27+
* `search` - Search for decimal key in dictionary
28+
29+
To train the model on the reverse task run:
30+
31+
```
32+
python neural_gpu_trainer.py --task=rev
33+
```
34+
35+
While training, interim / checkpoint model parameters will be
36+
written to `/tmp/neural_gpu/`.
37+
38+
Once the amount of error gets down to what you're comfortable
39+
with, hit `Ctrl-C` to stop the training process. The latest
40+
model parameters will be in `/tmp/neural_gpu/neural_gpu.ckpt-<step>`
41+
and used on any subsequent run.
42+
43+
To test a trained model on how well it decodes run:
44+
45+
```
46+
python neural_gpu_trainer.py --task=rev --mode=1
47+
```
48+
49+
To produce an animation of the result run:
50+
51+
```
52+
python neural_gpu_trainer.py --task=rev --mode=1 --animate=True
53+
```
1054

1155
Maintained by Lukasz Kaiser (lukaszkaiser)

0 commit comments

Comments
 (0)