cnnsetup.m problems in deep learning toolbox

Hello, when l try to execute my code (cnn classifier) using deep learning toolbox http://www.mathworks.com/matlabcentral/fileexchange/38310-deep-learning-toolbox l got this error from cnnsetup.m of deep learning toolbox : *Index exceeds matrix dimensions. Error in cnntrain (line 14) batch_y = y(:, kk((l – 1) * opts.batchsize + 1 : l * opts.batchsize)); Error in cnn_classifier (line 43) cnn = cnntrain(cnn, train_x, train_y, opts);* Here is my code of cnn_classifier.m % load training set and testing set clear all; train_set = loadMNISTImages(‘/home/anelmad/Desktop/TER/mnist_ml2/MNIST_digit_recognition-master/load_data/train-images.idx3-ubyte’); % 60000 x 784 train_label = loadMNISTLabels(‘/home/anelmad/Desktop/TER/mnist_ml2/MNIST_digit_recognition-master/load_data/train-labels.idx1-ubyte’); % 60000 x 1 test_set = loadMNISTImages(‘/home/anelmad/Desktop/TER/mnist_ml2/MNIST_digit_recognition-master/load_data/t10k-images.idx3-ubyte’); % 10000 x 784 test_label = loadMNISTLabels(‘/home/anelmad/Desktop/TER/mnist_ml2/MNIST_digit_recognition-master/load_data/t10k-labels.idx1-ubyte’); % 10000 x 1 % trasform the data format N = 10; % N is the number of output neurons Y = eye(N); train_size = size(train_set); test_size = size(test_set); train_y =…


Link to Full Article: cnnsetup.m problems in deep learning toolbox