RGB images for CNN
eric-haibin-lin opened this issue · comments
I noticed that the CNN example comes with training set data of black & white images. Now I'm trying to modify the programme so that CNN can be trained with the "CIFAR-10" dataset, which comes with 32 x 32 RGB coloured images.
So instead of 28 * 28 * N, I intend to reshape the training data into 32 * 32 * 3 * N (N is the number of input examples). However, this makes the evaluation of sigmoid function difficult.
For example, when I calculate the output layer at the end of forward feeding in cnnff.mat
% feedforward into output perceptrons
net.o = sigm(net.ffW * net.fv + repmat(net.ffb, 1, size(net.fv, 2)));
I have net.ffW of dimension 1 * 300, net.fv of dimension 300 * 3 * 50. I do not know how to modify the programme so that net.o has a dimension of 1 * 50.
Any ideas?
Have you successfully changed the code to use CIFAR-10?