DeepLearnToolbox icon indicating copy to clipboard operation
DeepLearnToolbox copied to clipboard

The layers of CNN

Open Clinuxyj opened this issue 10 years ago • 1 comments

Hii, I'm using the code about CNN,but I don't know that .

%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% error

rand('state',0)

cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer };

Actually, I want to know why the layer of CNN is 6c-2s-12c-2s and why kernelsize is 5. Could I modify these parameters? Is it a experienced model? what can I modify it according to?

Thanks

Clinuxyj avatar Sep 25 '14 13:09 Clinuxyj

Modifying params depends on your problem and input dims. Having a very large input will require to have bigger pooling units

Well, normally in the end of conv layers you have 1x1 feature maps generally. Then you have a fully connected layer.

However in DLT, I remember that after convolutions sizes were not 1x1, and programatically reduced to 1x1 with full connections, which means that you do not have to worry about kernel sizes very precisely (otherwise, you have to pick conv and pooling sizes such that at the end of this operations you have 1 dimension)

But as I said, one cant say what is the optimized kernel size for your application.

On Thu, Sep 25, 2014 at 3:30 PM, Clinuxyj [email protected] wrote:

Hii, I'm using the code about CNN,but I don't know that .

%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% error

rand('state',0)

cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer };

Actually, I want to know why the layer of CNN is 6c-2s-12c-2s and why kernelsize is 5. Could I modify these parameters? Is it a experienced model? what can I modify it according to?

Thanks

— Reply to this email directly or view it on GitHub https://github.com/rasmusbergpalm/DeepLearnToolbox/issues/117.

Taygun Kekeç

PhD Student, Computer Vision Laboratory Technical University of Delft Mekelweg 4, 2628CD +31645165967 +905414677824

taygunk avatar Sep 25 '14 16:09 taygunk