Skip to content

Commit

Permalink
reformat the table
Browse files Browse the repository at this point in the history
  • Loading branch information
lh3 committed Mar 4, 2017
1 parent bbcf905 commit b5d6001
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
27 changes: 13 additions & 14 deletions README.md
Expand Up @@ -170,40 +170,39 @@ int main(void)
with Conda, too. Keras-1.2.2 and Tensorflow-1.0.0 were installed with pip. On
both machines, Tiny-DNN was acquired from github on March 1st, 2017.
* MNIST-mlp implements a simple MLP with one layer of 64 hidden neurons.
MNIST-cnn applies two convolutional layers with 32 3-by-3 kernels and ReLU
* mnist-mlp implements a simple MLP with one layer of 64 hidden neurons.
mnist-cnn applies two convolutional layers with 32 3-by-3 kernels and ReLU
activation, followed by 2-by-2 max pooling and one 128-neuron dense layer.
Mul100-rnn uses two GRUs of size 160. Both input and output are 2-D
mul100-rnn uses two GRUs of size 160. Both input and output are 2-D
binary arrays of shape (14,2) -- 28 GRU operations for each of the 30000
training samples.
|Task |Framework |Machine|Device |Real time|CPU time|Command line |
|Task |Framework |Machine|Device |Real |CPU |Command line |
|:----------|:------------|:------|--------:|--------:|-------:|:------------|
|MNIST-mlp |KANN+SSE |Linux |1 CPU | 31.3s | 31.2s |mlp -m20 -v0|
|mnist-mlp |KANN+SSE |Linux |1 CPU | 31.3s | 31.2s |mlp -m20 -v0|
| | |Mac |1 CPU | 27.1s | 27.1s ||
| |KANN+OpenBLAS|Linux |1 CPU | 18.8s | 18.8s ||
| |Theano+Keras |Linux |1 CPU | 33.7s | 33.2s |OMP_NUM_THREADS=1 keras/mlp.py -m20 -v0|
| | | |4 CPUs | 32.0s |121.3s |OMP_NUM_THREADS=4 keras/mlp.py -m20 -v0|
| |Theano+Keras |Linux |1 CPU | 33.7s | 33.2s |keras/mlp.py -m20 -v0|
| | | |4 CPUs | 32.0s |121.3s ||
| | |Mac |1 CPU | 37.2s | 35.2s ||
| | | |2 CPUs | 32.9s | 62.0s ||
| |TF+Keras |Mac |1-2 CPUs | 64.2s |102.0s |keras/mlp.py -m20|
| |TensorFlow |Mac |1 CPU | 33.4s | 33.4s |tensorflow/mlp.py -m20|
| | | |2 CPUs | 29.2s | 50.6s |tensorflow/mlp.py -m20 -t2|
| |Tiny-dnn |Linux |1 CPU | 2m19s | 2m18s |tiny-dnn/mlp -m20|
| |Tiny-dnn+AVX |Linux |1 CPU | 1m34s | 1m33s ||
| | |Mac |1 CPU | 2m17s | 2m16s ||
|MNIST-cnn |KANN+SSE |Linux |1 CPU |57m57s |57m53s |mnist-cnn -v0 -m15|
|mnist-cnn |KANN+SSE |Linux |1 CPU |57m57s |57m53s |mnist-cnn -v0 -m15|
| | | |4 CPUs |19m09s |68m17s |mnist-cnn -v0 -t4 -m15|
| |Theano+Keras |Linux |1 CPU |37m12s |37m09s |OMP_NUM_THREADS=1 keras/mlp.py -Cm15 -v0|
| | | |4 CPUs |24m24s |97m22s |OMP_NUM_THREADS=4 keras/mlp.py -Cm15 -v0|
| |Theano+Keras |Linux |1 CPU |37m12s |37m09s |keras/mlp.py -Cm15 -v0|
| | | |4 CPUs |24m24s |97m22s ||
| | | |1 GPU |2m57s | |keras/mlp.py -Cm15 -v0|
| |Tiny-dnn+AVX |Linux |1 CPU |300m40s |300m23s |tiny-dnn/mlp -Cm15|
|Mul100-rnn |KANN+SSE |Linux |1 CPU |40m05s |40m02s |rnn-bit -l2 -n160 -m25 -Nd0|
|mul100-rnn |KANN+SSE |Linux |1 CPU |40m05s |40m02s |rnn-bit -l2 -n160 -m25 -Nd0|
| | | |4 CPUs |12m13s |44m40s |rnn-bit -l2 -n160 -t4 -m25 -Nd0|
| |KANN+OpenBLAS|Linux |1 CPU |22m58s |22m56s |rnn-bit -l2 -n160 -m25 -Nd0|
| | | |4 CPUs |8m18s |31m26s |rnn-bit -l2 -n160 -t4 -m25 -Nd0|
| |Theano+Keras |Linux |1 CPU |27m30s |27m27s |OMP_NUM_THREADS=1 keras/rnn-bit.py -l2 -n160 -m25|
| | | |4 CPUs |19m52s |77m45s |OMP_NUM_THREADS=4 keras/rnn-bit.py -l2 -n160 -m25|
| |Theano+Keras |Linux |1 CPU |27m30s |27m27s |keras/rnn-bit.py -l2 -n160 -m25|
| | | |4 CPUs |19m52s |77m45s ||
* In the single thread mode, Theano is about 50% faster than KANN probably due
to efficient matrix multiplication (aka. `sgemm`) implemented in MKL. As is
Expand Down
6 changes: 3 additions & 3 deletions examples/README.md
Expand Up @@ -61,16 +61,16 @@ like the python version.
### Character-level text generation with RNN

Implemented in [textgen.c](textgen.c). This is not a standard model in that the
initial hidden states depend on the previous output. It tends to memorize short
text better.
initial hidden states depend on the previous output. It tends to memorize text
better.
```sh
./textgen -o acc.kan accelerando.txt
./textgen -i acc.kan
```
You can also found a bigger model in kann-models. It can generate meaningful
text even with near-to-zero temperature.
```sh
./textgen -i acc-l3-n256r.kan -T 1e-6
./textgen -i kann-models/acc-l3-n256r.kan -T 1e-6
```

[data]: https://github.com/attractivechaos/kann

0 comments on commit b5d6001

Please sign in to comment.