Open Addhi86 opened 7 years ago
Those are the very basic things my friend. You need to go through the understanding the mnist dataset. You can find the dataset under 'data' folder. The dataset is divided into training and testing sets. Training sets have images and labels, testing sets have images only for which a label is predicted. Hope this helps. If you are comfortable with python, You can find a python translation of the code here. https://github.com/wajihullahbaig/DeepNeuralNetworks
Thanks Wajihullah baig, Yes, you are right it was the basic query.
i am more comfortable with MATLAB.
some other things which I want to know is:
1) struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer
I have confusion in understanding what is meant by 'outputmaps'? 'kernelsize' 5 mean the filter size is 5x5.
2) struct('type', 's', 'scale', 2) %sub sampling layer
This sub sampling layer with the size 2x2? is it possible to add ReLu layer?
3) What is opt.alpha?
4) In the test_example_CNN if i add more convolution and sub sampling layer I got an error. what is the reason?
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) %sub sampling layer
struct('type', 'c', 'outputmaps', 18, 'kernelsize', 5) %convolution layer
struct('type', 's', 'scale', 2) %subsampling layer
};
Error: Array dimensions must match for binary array op.
Error in cnnbp (line 32) z = z + convn(net.layers{l + 1}.d{j}, rot180(net.layers{l + 1}.k{i}{j}), 'full');
Error in cnntrain (line 17) net = cnnbp(net, batch_y);
Error in test_example_CNN (line 31) cnn = cnntrain(cnn, train_x, train_y, opts);
You should first understand the concepts of convolutional networks. Its too lengthy to explain here. Once you grasp the ideas, you will note that it is easy to follow code or write your own. I suggest you read about them from link/blogs/videos by andrej karpathy.
Thanks I will check that.. Is it too lengthy to give answer of each question?
You can add any sorts of layers - Just make sure you dont break the code. A ReLU is a good idea. I am note sure why you are getting array dimension errors, possibly your data that is being convolved with a filter is some how mismatched in terms of dimensions. You should check if convn() function parameters accepted.
Hello,
I have started learning about the deep learning, I have downloaded this toolbox. To understand about the CNN I have started with the 'test_example_CNN' I am confused about these variables
train_x, test_x, train_y, test_y
why it is with 'x' and 'y' Also what iscnnsetup
?