INPUT TO NEURAL NETWORK

hi.. i m new at neural networks.
The size of the the image which i m giving as an input to the neural network is 9*92.
as far as i know, number of input neurons should be equal to the size of the image but when i give the following command it gives me an error message.
command is.... ]
net4=newff(minmax(input), [738, 50, 7] {'tansig','tansig','purelin'}, 'trainlm');
train(net4,input);
and error is....
??? Out of memory. Type HELP MEMORY for your options.
Error in ==> calcjx>reprow at 339
m = m(rem(0:(mrows*n-1),mrows)+1,:);
Error in ==> calcjx at 253
gIW{i,j,ts} =
reprow(gIWZ{i,j,ts},inputWeightCols(i,j)) .* ...
Error in ==> calcjejj at 132
Jx = feval(gradientFcn,net,Pd,Zb,Zi,Zl,N,Ac,Q,TS);
Error in ==> trainlm at 284
[je,jj,gradient] =
calcjejj(net,trainV.Pd,Zb,Zi,Zl,N,Ac,El,Q,TS,mem_reduc);
Error in ==> network.train at 216
[net,tr] = feval(net.trainFcn,net,tr,trainV,valV,testV);
should i have to down sample the image???? or tell me plz some way to reduce size of my input,
suggest me some solution...plz.
thanx.

1 comentario

Sean de Wolski
Sean de Wolski el 11 de Abr. de 2012
What function are you calling and what are you calling it with? Please edit your question to include the relevant code and the output of whos()

Iniciar sesión para comentar.

 Respuesta aceptada

Greg Heath
Greg Heath el 11 de Abr. de 2012

0 votos

It is sufficient to use 1 hidden layer. Input images with dimensions [row col ], should be columnized to a vector of length I = row*column using the colon operator, image1(:). For N images, the input matrix x, and target matix, t, will have the sizes
[ I N ] = size(x);
[ O N ] = size(t);
You have not specified what the network is supposed to do. If it is classification, O = the number of classes and the columns of t should be columns of the O-dimensional unit matrix. The row positions of the "ones" indicates the class to which the corresponding input should be assigned.
See the Neural Network Toolbox pattern recognition and classification demos.
Hope this helps.
Greg

2 comentarios

Greg Heath
Greg Heath el 11 de Abr. de 2012
I = 9*92 = 828 is too large.
You should use feature extraction and reduce this considerably. PRINCOMP (Principal Component Analysis) is typically used for image dimensionality reduction. The inputs then become the projections of x into the lower dimensional space of dominant eigenvectors.
Hope this helps.
Greg
Amber Malick
Amber Malick el 16 de Abr. de 2012
my neural network has to classify images into 7 classes.
i resized my image to 5*41, will it work now???
can u please tell me how large it can be???
means what maximum size should i use???
thanx.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by