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

Sean de Wolski
Sean de Wolski 2012년 4월 11일
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()

댓글을 달려면 로그인하십시오.

 채택된 답변

Greg Heath
Greg Heath 2012년 4월 11일

0 개 추천

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

Greg Heath
Greg Heath 2012년 4월 11일
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 2012년 4월 16일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by