Digit Recognizer by Convolutional Neural Network (CNN)Ding Li2018.06online store: costumejewelry1.com
MNIST database(Modified National Institute of Standards and Technology database)60,000 training images; 10,000 testing imagesKaggle Challenge42,000 training images; 28,000 testing imagesInputHandwritten DigitResultPredict784 (28*28) PixelsPixel color coding [0,255]Input ImagePixel ValueLabel[0,9]https://en.wikipedia.org/wiki/MNIST database2
Conv 13*3Conv 23*316 filters16 filters24*24*1626*26*16Input28*28Conv 33*3Conv 43*332 filters32 filters51212*12*16TrainableParameters:814,778Max pool 22*28*8*3210*10*32FlattenMax pool 12*24*4*32Dense 1ReluDense 2ReluDense 4512https://en.wikipedia.org/wiki/Convolutional neural networkLeNet - dLabel[0,9]10VGG 16https://en.wikipedia.org/wiki/Yann LeCun3
101001010010100*10-110-110-110 10 00 -110 10 010 -110 10 010 -11 100010001000 30Detected edge10 10 1000010 10 1000010 10 1000010 10 1000010 10 1000010 10 100001*0-110-110-1030 300030 300030 300030 300No lanation-convnets/4
*10-110-110-1111000-1-1-1Multiple convolutional filters (kernels) can capture different changes of neighborhood ion-kernels-with-online-demo5
38217911Max Pool924523Size: 2 x 2635612Pool after convolutional layer, reduce noise and data size.Local information are concentrated into higher level information.Besides max pool, there is also average pool.6
Inputx0, x1, x2OutputaParametersw0, w1, w2, b(to be optimized)π§ w 0 x0 w 1 x1 w 2 x2 ba f(z)activation functionNonlinearincrease certaintyononoffoffReLUf(z) max(0, dπ(π§) 11 π π§7
All the input from the previous layer arecombined at each 3]π5[1]11111[1]11111π0 π(π€0,0 π₯0 π€1,0 π₯1 π€2,0 π₯2 π€3,0 π₯3 π0 )π1 π(π€0,1 π₯0 π€1,1 π₯1 π€2,1 π₯2 π€3,1 π₯3 π1 ) .All the local features extracted in previouslayers are fully connected with differentweights to construct global features.Complicated relationship between input canbe revealed by deep networks.Fully Connected at-is-deep-learning/8
[πΏ 1]π0[πΏ 1]π1[πΏ 2]π2[πΏ 1]π1023L-1 layerπΏπ€0,0πΏπΏ 1π§0 π€0,0 π0π¦ΰ· 00π¦ΰ· 11π¦ΰ· 22 . . πΏπ€1023,0Linear combination of inputs from previous layer:πΏπΏ 1 π€1,0 π1πΏπΏ 1 π€2,0 π2L layer[πΏ 1]πΏSoftmax, normalize the result:π¦ΰ· 0 π π§0π π§0 π π§1 π π§2 π π§9Probability that π¦ΰ· 0π¦ΰ· 0 π¦ΰ· 1 π¦ΰ· 2 π¦ΰ· 9 1E.g. y 0Prediction:π¦ΰ· [ π¦ΰ· 0, π¦ΰ· 1, π¦ΰ· 2, π¦ΰ· 9 ]π¦ΰ· [ π. π, 0.02, 0.01, 0.02, 0.04]True value:y [ y0 , y 1 , y 2 , y 9 ]y [ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]9ΰ· π¦ π¦π log(π¦ΰ·π )Loss function: πΏ π¦,π¦ΰ· 9πΏ π€1023,0 π1023 π0πΏ π¦,ΰ· π¦ 1 log 0.9 0.046π 09L 0,ΰ· π¦ 1 log 1 0ππ‘ πππ π‘ πππ‘πβ π¦ΰ· y, πΏ π¦,1ΰ·Cost function: π½(π€, π) π Οπ πΏ π¦,π¦π‘ππ‘ππ πππ π ππ π π ππππππ πΊπππ: πππππππ§π π‘βπ πππ π‘ ππ’πππ‘πππ.A Friendly Introduction to Cross-Entropy Loss9
π΄[πΏ 2][πΏ 2]π0[πΏ 2]π1[πΏ 2]π2π [πΏ 1]π [πΏ 1]π΄[πΏ 1][πΏ 1]π0[πΏ 1]π1[πΏ 2]π21. With the initial parameters W and b, predict the label π¦ΰ· withforward propagation, calculate the cost.π [πΏ] π [πΏ]π¦ΰ· 0π¦ΰ· 101π¦ΰ· 2L-2 layer[πΏ 1]π1023L-1 layer2 . . . . π¦ΰ· 9L layer[πΏ 2]π1023πΊπππ: πππππππ§π π‘βπ ππππππππππ πππ‘π€πππ πππππππ‘ππ π¦ΰ· πππ π‘ππ’π π¦.Forward PropagationBackpropagation2. πππ‘ππππ§π π‘βπ πππππππ‘πππ ππ πΏ πππ¦ππ, π [πΏ] & π [πΏ] ,assuming inputs from L-1 layer, π΄[πΏ 1] do not change.3. πΆππππ’πππ‘π π‘βπ πβππππ ππ πΏβ 1 πππ¦ππ ππππ’π‘ , π΄[πΏ 1] ,which is needed to minimize the cost funtion,assuming parameters π [πΏ] & π [πΏ] do not change.4. πππ‘ππππ§π π‘βπ πππππππ‘πππ ππ πΏβ 1 πππ¦ππ, π [πΏ 1] & π [πΏ 1] ,ππππ π‘βπ πππ ππππ πβπππππ of π΄[πΏ 1] .95. Proceed like this all the way to the first layer,optimize the parameters W and b of all layers.6. Running forward propagation and backpropagation once is calledone epoch, run multiple epochs until cost is near minimum value.10
A proportion of nodes in thelayer are randomly ignored foreach training sample.This technique can force the network to learn features in a distributed way and reduces the overfitting.Dropout applied after the two pool layers and first two full connected layers.11
After 1 hour, 30 epochsβ training,achieved 99.67% accuracy.Some images are even hard for human torecognize, more samples like these can help.12
Convolution Matrix, 16 filtersGenerated from trainingInputOutput13
More abstract14
lightLogicalsignalssignalsThe machine will combined the 1024 final values to judge the label [0,9].15
Can we understand machineβs βmindβ?16
Convolutional Neural Network is very powerful for analyzing visual image. The convolutional layers can capture the local features. The pooling layers can concentrate the local changes, as well as reduce the noise and data size. The full connected layers can combine all the local features to generate global features . The global features are combined to make the final judgement, here the probability of label [0,9]. Can human understand Artificial Neural Networks? Is there any similarity between brain and CNN to process the visual information? What is the meaning of local and global features generated by machines? Can human understand machinesβ logic?Python code of the project at kaggle: ith-cnn-keras17
Convolutional Neural Network is very powerful for analyzing visual image. The convolutional layers can capture the local features. The pooling layers can concentrate the local changes, as well as reduce the noise and data size. The full connected layers can combine all the local features to generate global features .
Add 3-digit and 1-digit numbers - crossing 10 Add two 4-digit numbers β no exchange 6 12/10/20 Mon Add and subtract 3-digit and 2-digit numbers - not crossing 100 Add 3-digit and 2-digit- cross 100 Tue Add 3-digit and 2-digit - cross 100 Add two 3-digits cross 10 or 100 Wed Add 2-digit and 3-digit numbers - crossing 10 or
Two 1-digit numbers: 0 to 9 2-digit number from a 2-digit number: no regrouping 2-digit number from a 2-digit number: regrouping Multiplication Multiplication facts: 0 to 9 2-digit number times 1-digit number: no regrouping 3-digit number times 1-digit number: regrouping Division Division facts: 0 to 9 2-digit
Learning a Deep Convolutional Network for Image Super-Resolution . a deep convolutional neural network (CNN) [15] that takes the low- . Convolutional Neural Networks. Convolutional neural networks (CNN) date back decades [15] and have recently shown an explosive popularity par-
2 Convolutional neural networks CNNs are hierarchical neural networks whose convolutional layers alternate with subsampling layers, reminiscent of sim-ple and complex cells in the primary visual cortex [Wiesel and Hubel, 1959]. CNNs vary in how convolutional and sub-sampling layers are realized and how the nets are trained. 2.1 Image processing .
Digit 1 M Trane mini split unit Digit 2 W Heat pump C Cooling only Digit 3 W Wall-mounted unit Digit 4 5 Threaded connection Digit 5, 6 Nominal cooling capacity 09 12 18 Digit 7 Design serial no. M Free split inverter indoor unit system (with electronic expansion valve) Digit 8 Power supply type M 220 240V/50Hz/1PH Digit 9 .
Video Super-Resolution With Convolutional Neural Networks Armin Kappeler, Seunghwan Yoo, Qiqin Dai, and Aggelos K. Katsaggelos, Fellow, IEEE AbstractβConvolutional neural networks (CNN) are a special type of deep neural networks (DNN). They have so far been suc-cessfully applied to image super-resolution (SR) as well as other image .
Performance comparison of adaptive shrinkage convolution neural network and conven-tional convolutional network. Model AUC ACC F1-Score 3-layer convolutional neural network 97.26% 92.57% 94.76% 6-layer convolutional neural network 98.74% 95.15% 95.61% 3-layer adaptive shrinkage convolution neural network 99.23% 95.28% 96.29% 4.5.2.
Albert Woodfox and Herman Wallace were convicted of the murder in 1972 of prison guard Brent Miller. They were placed in isolation together with a third man, Robert King, who was accused of a different crime. Robert King was released in 2001 after serving 29 years in solitary. Herman Wallace and Albert Woodfox remain in solitary confinement in .