debug Mode when train

3 views (last 30 days)
lie akira
lie akira on 1 Feb 2012
Can you help me????
I have code like this
[imagefile] = imread([direktori,namafile],'bmp');
filegambar = im2bw(imagefile,0.5);
imagefile = bwmorph(~filegambar,'thin','Inf');
P= imagefile(:,1:200)';
T= imagefile(:,1:200)';
[pn,meanp,stdp,tn,meant,stdt]=prestd(P,T)
net=newff(minmax(pn),[4,3,1], {'tansig' 'logsig' 'purelin'},'traingdm');
net.IW{1,1}
net.b{1}
net.LW{2,1}
net.b{2}
net.LW{3,2}
net.b{3}
net.trainParam.lr = 0.1
net.trainParam.goal = 0.00001
net.trainParam.epochs = 500
net.trainParam.show = 500
net=train(net,P)
but when i write this code "net=train(net,P)" , the result is nothing, even out of debug mode,
Can show where the error??
and Can you give me a solution for??
I really need your help

Accepted Answer

Greg Heath
Greg Heath on 2 Feb 2012
[imagefile] = imread([direktori,namafile],'bmp');
filegambar = im2bw(imagefile,0.5);
imagefile = bwmorph(~filegambar,'thin','Inf');
P= imagefile(:,1:200)';
T= imagefile(:,1:200)';
WHAT IS THIS NET SUPPOSED TO DO?
WHATEVER IT IS P AND T SHOULD NOT BE EQUAL.
PLEASE EXPLAIN P,T AND THEIR DIMENSIONS.
[pn,meanp,stdp,tn,meant,stdt]=prestd(P,T)
net=newff(minmax(pn),[4,3,1], {'tansig' 'logsig' 'purelin'},'traingdm');
YOU ONLY NEED ONE HIDDEN LAYER.
CHOOSE THE NUMBER OF HIDDEN NODES BY TRIAL AND ERROR.
SEARCH THE NEWSGROUP USING
HEATH NEQ NW
FOR A 1-D OUTPUT SIZE(T) = [ 1 N ]
net.IW{1,1}
net.b{1}
net.LW{2,1}
net.b{2}
net.LW{3,2}
net.b{3}
net.trainParam.lr = 0.1
net.trainParam.goal = 0.00001
net.trainParam.epochs = 500
net.trainParam.show = 500
IT IS USUALLY BEST TO BEGIN WITH DEFAULTS AND THEN CORRECT AS NEEDED.
net=train(net,P)
NO. YOU HAVE STANDARDIZED THE INPUTS. THEREFORE USE pn.
but when i write this code "net=train(net,P)" , the result is nothing, even out of debug mode,
HARD TO COMMENT ON THAT UNTIL YOU MAKE THE ABOVE CORRECTIONS.
P.S. i DID NOT CHECK THE FIRST 3 COMMANDS. SO, DO SO BEFORE RERUNNING,
HOPE THIS HELPS.
GREG
  1 Comment
lie akira
lie akira on 10 Feb 2012
thanks a lot, very helpful.... i'm new in pattern recognition...
i'm use backpropagation for that, but i'm so confused..

Sign in to comment.

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!