Hi - I've been doing some experiments generation MNIST networks with genetic algos. Everything was working pretty well and I pulled with master and saw very different results for my network.
I went back to the project and ran the examples/mnist-classification and saw pretty different behavior over the last two commits ( Softmax image (#208)) and (Convolution tensors (#207)) I thought I would point it out since it looks like there was work done in that area.
Here is the result for the current master:
steps I took
- checkout master (fec6fa808fe3086d7977fca4c3cae811f920eb0e Softmax image (#208))
-lein clean
-cd cortex
-lein install
-cd experiment
-lein install
-cd examples/mnist-classification
-rm *nippy
-lein run
Welcome! Please wait while we compile some Clojure code...
Reflection warning, cognitect/transit.clj:142:19 - call to static method writer on com.cognitect.transit.TransitFactory can't be resolved (argument types: unknown, java.io.OutputStream, unknown).
Aug 20, 2017 7:16:30 PM com.github.fommil.jni.JniLoader liberalLoad
INFO: successfully loaded /var/folders/cj/s4l2n2kn0ld5km979f23h83m0000gn/T/jniloader4215364497013515858netlib-native_system-osx-x86_64.jnilib
Loading mnist training dataset.
Done loading mnist training dataset in 17.517s
Loading mnist test dataset.
Done loading mnist test dataset in 3.669s
Training forever from uberjar.
Ensuring image data is built, and available on disk.
Training forever.
Building dataset from folder: mnist/training
Building dataset from folder: mnist/test
Training network:
| type | input | output | :bias | :centers | :means | :scale | :variances | :weights |
|----------------------+------------------+------------------+--------+----------+--------+--------+------------+------------|
| :convolutional | 1x28x28 - 784 | 20x24x24 - 11520 | [20] | | | | | [20 25] |
| :max-pooling | 20x24x24 - 11520 | 20x12x12 - 2880 | | | | | | |
| :dropout | 20x12x12 - 2880 | 20x12x12 - 2880 | | | | | | |
| :relu | 20x12x12 - 2880 | 20x12x12 - 2880 | | | | | | |
| :convolutional | 20x12x12 - 2880 | 50x8x8 - 3200 | [50] | | | | | [50 500] |
| :max-pooling | 50x8x8 - 3200 | 50x4x4 - 800 | | | | | | |
| :batch-normalization | 50x4x4 - 800 | 50x4x4 - 800 | [800] | | [800] | [800] | [800] | |
| :linear | 50x4x4 - 800 | 1x1x1000 - 1000 | [1000] | | | | | [1000 800] |
| :relu | 1x1x1000 - 1000 | 1x1x1000 - 1000 | | | | | | |
| :dropout | 1x1x1000 - 1000 | 1x1x1000 - 1000 | | | | | | |
| :linear | 1x1x1000 - 1000 | 1x1x10 - 10 | [10] | | | | | [10 1000] |
| :softmax | 1x1x10 - 10 | 1x1x10 - 10 | | | | | | |
Parameter count: 849780
Saving network to trained-network.nippy
Classification accuracy: 0.8417
Classification accuracy: 0.6165
Classification accuracy: 0.7771
Classification accuracy: 0.8351
Saving network to trained-network.nippy
Classification accuracy: 0.8491
Saving network to trained-network.nippy
Classification accuracy: 0.8557
Classification accuracy: 0.8518
Saving network to trained-network.nippy
Classification accuracy: 0.8783
Saving network to trained-network.nippy
Classification accuracy: 0.8885
Classification accuracy: 0.8666
Saving network to trained-network.nippy
Classification accuracy: 0.9065
Classification accuracy: 0.8327
Classification accuracy: 0.8538
Saving network to trained-network.nippy
Classification accuracy: 0.9076
Saving network to trained-network.nippy
Classification accuracy: 0.9327
Classification accuracy: 0.9282
Classification accuracy: 0.9169
Classification accuracy: 0.9246
Classification accuracy: 0.9229
Classification accuracy: 0.9275
Here is the result for a couple commits back:
git checkout bf9ea7b5aa4516cede1c66b2938fd38c1be3b298
Arbitrary transpose (#206)
Compiling mnist-classification.main
Welcome! Please wait while we compile some Clojure code...
Reflection warning, cognitect/transit.clj:142:19 - call to static method writer on com.cognitect.transit.TransitFactory can't be resolved (argument types: unknown, java.io.OutputStream, unknown).
Aug 20, 2017 7:23:35 PM com.github.fommil.jni.JniLoader liberalLoad
INFO: successfully loaded /var/folders/cj/s4l2n2kn0ld5km979f23h83m0000gn/T/jniloader3330058796203364158netlib-native_system-osx-x86_64.jnilib
Loading mnist training dataset.
Done loading mnist training dataset in 17.325s
Loading mnist test dataset.
Done loading mnist test dataset in 3.012s
Training forever from uberjar.
Ensuring image data is built, and available on disk.
Training forever.
Building dataset from folder: mnist/training
Building dataset from folder: mnist/test
Training network:
| type | input | output | :bias | :centers | :means | :scale | :variances | :weights |
|----------------------+------------------+------------------+--------+----------+--------+--------+------------+------------|
| :convolutional | 1x28x28 - 784 | 20x24x24 - 11520 | [20] | | | | | [20 25] |
| :max-pooling | 20x24x24 - 11520 | 20x12x12 - 2880 | | | | | | |
| :dropout | 20x12x12 - 2880 | 20x12x12 - 2880 | | | | | | |
| :relu | 20x12x12 - 2880 | 20x12x12 - 2880 | | | | | | |
| :convolutional | 20x12x12 - 2880 | 50x8x8 - 3200 | [50] | | | | | [50 500] |
| :max-pooling | 50x8x8 - 3200 | 50x4x4 - 800 | | | | | | |
| :batch-normalization | 50x4x4 - 800 | 50x4x4 - 800 | [800] | | [800] | [800] | [800] | |
| :linear | 50x4x4 - 800 | 1x1x1000 - 1000 | [1000] | | | | | [1000 800] |
| :relu | 1x1x1000 - 1000 | 1x1x1000 - 1000 | | | | | | |
| :dropout | 1x1x1000 - 1000 | 1x1x1000 - 1000 | | | | | | |
| :linear | 1x1x1000 - 1000 | 1x1x10 - 10 | [10] | | | | | [10 1000] |
| :softmax | 1x1x10 - 10 | 1x1x10 - 10 | | | | | | |
Parameter count: 849780
Saving network to trained-network.nippy
Classification accuracy: 0.89
Saving network to trained-network.nippy
Classification accuracy: 0.917
Classification accuracy: 0.9134
Saving network to trained-network.nippy
Classification accuracy: 0.9258
Saving network to trained-network.nippy
Classification accuracy: 0.9345
Saving network to trained-network.nippy
Classification accuracy: 0.9381
Saving network to trained-network.nippy
Classification accuracy: 0.9554
Saving network to trained-network.nippy
Classification accuracy: 0.9588
Classification accuracy: 0.9521
Saving network to trained-network.nippy
Classification accuracy: 0.9624
Saving network to trained-network.nippy
Classification accuracy: 0.9658
Saving network to trained-network.nippy
Classification accuracy: 0.9667
Classification accuracy: 0.9666
Saving network to trained-network.nippy
Classification accuracy: 0.9684
Saving network to trained-network.nippy
Classification accuracy: 0.9697
Classification accuracy: 0.9695
Saving network to trained-network.nippy
Classification accuracy: 0.9714
Classification accuracy: 0.9698
Classification accuracy: 0.971
Saving network to trained-network.nippy
Classification accuracy: 0.975
Saving network to trained-network.nippy
Classification accuracy: 0.9753
Classification accuracy: 0.9747
Classification accuracy: 0.9734
Saving network to trained-network.nippy
Classification accuracy: 0.976
Classification accuracy: 0.9741
Classification accuracy: 0.9742
Saving network to trained-network.nippy
Classification accuracy: 0.9766
Classification accuracy: 0.9741
Classification accuracy: 0.9703
Classification accuracy: 0.9752
I noticed the older commit seems to run much faster too.
Best,
Carin