深度学习之卷积神经收集CNN做手写体识另外VS代码。
反对于linux版本以及VS2012版本。
tiny-cnn:AC++11implementationofconvolutionalneuralnetworks========tiny-cnnisaC++11implementationofconvolutionalneuralnetworks.designprinciple-----*fast,withoutGPU98.8%accuracyonMNISTin13minutestraining(@Corei7-3520M)*headeronly,policy-baseddesignsupportednetworks-----###layer-types*fully-connectedlayer*convolutionallayer*averagepoolinglayer###activationfunctions*tanh*sigmoid*rectifiedlinear*identity###lossfunctions*cross-entropy*mean-squared-error###optimizationalgorithm*stochasticgradientdescent(with/withoutL2normalization)*stochasticgradientlevenbergmarquardtdependencies-----*boostC++library*IntelTBBsamplecode------```cpp#include"tiny_cnn.h"usingnamespacetiny_cnn;//specifyloss-functionandoptimization-algorithmtypedefnetworkCNN;//tanh,32x32input,5x5window,1-6feature-mapsconvolutionconvolutional_layerC1(32,32,5,1,6);//tanh,28x28input,6feature-maps,2x2subsamplingaverage_pooling_layerS2(28,28,6,2);//fully-connectedlayersfully_connected_layerF3(14*14*6,120);fully_connected_layerF4(120,10);//connectallCNNmynet;mynet.add(&C1);mynet.add(&S2);mynet.add(&F3);mynet.add(&F4);assert(mynet.in_dim()==32*32);assert(mynet.out_dim()==10);```moresample,readmain.cppbuildsampleprogram------###gcc(4.6~)withouttbb./wafconfigure--BOOST_ROOT=your-boost-root./wafbuildwithtbb./wafconfigure--TBB--TBB_ROOT=your-tbb-root--BOOST_ROOT=your-boost-root./wafbuildwithtbbandSSE/AVX./wafconfigure--AVX--TBB--TBB_ROOT=your-tbb-root--BOOST_ROOT=your-boost-root./wafbuild./wafconfigure--SSE--TBB--TBB_ROOT=your-tbb-root--BOOST_ROOT=your-boost-root./wafbuildoreditinlude/co
1