ConvNetJS CIFAR-10 demo
Description
This demo trains a Convolutional Neural Network on the CIFAR-10 dataset in your browser, with nothing but Javascript. The state of the art on this dataset is about 90% accuracy and human performance is at about 94% (not perfect as the dataset can be a bit ambiguous). I used this python script to parse the original files (python version) into batches of images that can be easily loaded into page DOM with img tags.
This dataset is more difficult and it takes longer to train a network. Data augmentation includes random flipping and random image shifts by up to 2px horizontally and verically.
By default, in this demo we're using Adadelta which is one of per-parameter adaptive step size methods, so we don't have to worry about changing learning rates or momentum over time. However, I still included the text fields for changing these if you'd like to play around with SGD+Momentum trainer.
Report questions/bugs/suggestions to @karpathy.
Training Stats
Backprop time per example: 24ms
Classification loss: 2.24887
L2 Weight decay loss: 0.00085
Training accuracy: 0.16
Validation accuracy: -1
Examples seen: 141
Momentum:
Batch size:
Weight decay:
Instantiate a Network and Trainer
Network Visualization
max gradient: 0.01467, min: -0.01771
Weight Gradients:
max activation: 1.13915, min: -0.9202
max gradient: 0.0151, min: -0.01904
parameters: 16x5x5x3+16 = 1216
max gradient: 0.01867, min: -0.01904
max activation: 1.13915, min: 0
max gradient: 0.01867, min: -0.01904
()()()()()()()()()()()()()()()()()()()()
Weight Gradients:
()()()()()()()()()()()()()()()()()()()()
max activation: 0.74686, min: -1.94339
max gradient: 0.05836, min: -0.05125
parameters: 20x5x5x16+20 = 8020
max gradient: 0.0788, min: -0.06547
max activation: 0.74686, min: 0
max gradient: 0.0788, min: -0.06547
()()()()()()()()()()()()()()()()()()()()
Weight Gradients:
()()()()()()()()()()()()()()()()()()()()
max activation: 0.46723, min: -0.37553
max gradient: 0.11546, min: -0.15106
parameters: 20x5x5x20+20 = 10020
max gradient: 0.11546, min: -0.15106
max activation: 0.46723, min: 0
max gradient: 0.11546, min: -0.15106
max gradient: 0.11617, min: -0.82716
parameters: 10x320+10 = 3210
max gradient: 0, min: 0