rasmusbergpalm / DeepLearnToolbox

Matlab/Octave toolbox for deep learning. Includes Deep Belief Nets, Stacked Autoencoders, Convolutional Neural Nets, Convolutional Autoencoders and vanilla Neural Nets. Each method has examples to get you started.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The structure of CNN

AbbyLu opened this issue · comments

Hi
I have just started to learn CNN.
I have a couple of questions about the structure of CNN.
Is it possible to change the kernel size from square to rectangle in convolution layer?
Can the scale in subsampling layer be changed in the same way, too?
Now I am learning to use the code about CNN in DeepLearnToolbox which is created by rasmusbergpalm.

%% 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
};

I don't know how to modify the code to set a rectangle kernel size and scale. (or it is impossible?)
Could someone help me?

Thank you very much!!

i am also new to CNN so based on little knowledge i have about it all i can say is that yes you can modify the kernel size and scale size for tuning.

 On Tuesday, May 5, 2015 9:01 AM, AbbyLu <notifications@github.com> wrote:

Hi
I have just started to learn CNN.
I have a couple of questions about the structure of CNN.
Is it possible to change the kernel size from square to rectangle in convolution layer?
Can the scale in sampling layer be changed in the same way, too?
Now I am learning to use the code about CNN in DeepLearnToolbox which is created by rasmusbergpalm. %% 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% errorrand('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
};I don't know how to modify the code to set a rectangle kernel size and scale. (or it is impossible?)
Could someone help me? Thank you very much!!—
Reply to this email directly or view it on GitHub.