From: chris Austin on 7 Feb 2010 06:08 Here i am trying to parse a 160-by-120 binary image size to the neural network but it throwing exceptions i don't understand. can someone help me out on how to put an image to the NNs? i also tried to flatten the image before passing it in but same error. input = image; %160-by-120 binary image size(basically just black and white) target = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]; >> net = newfit(input,target,10); ??? Error using ==> minmax at 43 Argument has illegal type. Error in ==> network.subsasgn>setInputExampleInput at 909 range = minmax(p); Error in ==> network.subsasgn at 96 [net,err] = setInputExampleInput(net,i,exampleInput); Error in ==> newff>new_5p1 at 144 net.inputs{1}.exampleInput = p; Error in ==> newff at 89 net = new_5p1(varargin{:}); Error in ==> newfit at 67 net = newff(varargin{:});
From: us on 7 Feb 2010 15:09 "chris Austin" <christianaugustine(a)yahoo.com> wrote in message <hkm6uj$f0l$1(a)fred.mathworks.com>... > Here i am trying to parse a 160-by-120 binary image size to the neural network but it throwing exceptions i don't understand. can someone help me out on how to put an image to the NNs? i also tried to flatten the image before passing it in but same error. > > input = image; %160-by-120 binary image size(basically just black and white) > target = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]; a hint: - 1st: do NOT name a variable INPUT as this is a built-in ML function... - 2nd: try img=double(image); % ... us
From: chris Austin on 8 Feb 2010 16:39 "us " <us(a)neurol.unizh.ch> wrote in message <hkn6l0$51v$1(a)fred.mathworks.com>... > "chris Austin" <christianaugustine(a)yahoo.com> wrote in message <hkm6uj$f0l$1(a)fred.mathworks.com>... > > Here i am trying to parse a 160-by-120 binary image size to the neural network but it throwing exceptions i don't understand. can someone help me out on how to put an image to the NNs? i also tried to flatten the image before passing it in but same error. > > > > input = image; %160-by-120 binary image size(basically just black and white) > > target = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]; > > a hint: > - 1st: do NOT name a variable INPUT as this is a built-in ML function... > - 2nd: try > > img=double(image); > % ... > > us thanks very much for your reply. I have followed you instructions but i got a different set of errors this time. here is the code I ran...... img=imread('1000001.png'); target1 = [0,0,0,0,0,1,0,0,0,0,0]; ims = double(img); net = newfit(ims,target1,10); and the error i get is.......... Error in ==> fixunknowns>new_process at 87 unknown_rows = ~isfinite(sum(x,2))'; Error in ==> boiler_process at 136 [out1,out2] = new_process(in1,in2); y =[]; % MATLAB BUG if [out1,y] =... Error in ==> fixunknowns at 65 boiler_process Error in ==> network.subsasgn>calcProcessSettings at 1087 [p2,ps] = feval(ithFcn,p,paramValues{:}); Error in ==> network.subsasgn>setInputProcessFcns at 961 [processSettings,p] = calcProcessSettings(p,processFcns,processParams); Error in ==> network.subsasgn at 106 [net,err] = setInputProcessFcns(net,i,processFcns); Error in ==> newff>new_5p1 at 145 net.inputs{1}.processFcns = ipf; Error in ==> newff at 89 net = new_5p1(varargin{:}); Error in ==> newfit at 67 net = newff(varargin{:});
From: us on 8 Feb 2010 16:52 "chris Austin" > and the error i get is.......... > > Error in ==> fixunknowns>new_process at 87 > unknown_rows = ~isfinite(sum(x,2))'; you show the error stack - but NOT the actual error(!)... anyhow, you could do this % at the command prompt, type dbstop if error; % run your code, it will error and stop at the offending line... % now, check your vars... us
From: chris Austin on 8 Feb 2010 17:04 "us " <us(a)neurol.unizh.ch> wrote in message <hkq124$hag$1(a)fred.mathworks.com>... > "chris Austin" > > and the error i get is.......... > > > > Error in ==> fixunknowns>new_process at 87 > > unknown_rows = ~isfinite(sum(x,2))'; > > you show the error stack - but NOT the actual error(!)... > anyhow, you could do this > > % at the command prompt, type > dbstop if error; > % run your code, it will error and stop at the offending line... > % now, check your vars... > > us i appreciate the quick response. I tried flattening the image and it succeeded. however, rather than putting just one image to the net, i want to put 300 different images. is this possible? if yes how can i possibly achive this? Thank you so much.
|
Pages: 1 Prev: Face recognition technique for newbie Next: Motion estimation vs. background subtraction |