About neural network : newbie question

1 回表示 (過去 30 日間)
Parkz Leingodz
Parkz Leingodz 2013 年 12 月 18 日
コメント済み: Parkz Leingodz 2013 年 12 月 20 日
I am a new to matlab. I just covert my image to matrix and want to train it. here is my coding:
P= [];
for i =1:15
str=strcat('E:Skripsi\crop2\image',int2str(i),'.bmp');
eval('img=imread(str);');
img=reshape(img,[],1);
P= [P img];
end
T=[1 1 1 1 1 1 1 1 1 1 0 0 0 0 0];// if true image i make it 1 , negative image make it 0
p = num2cell(P,1);
t = num2cell(T,1);
net = newff(minmax(p), [3 1], {'logsig' 'purelin'});
net.trainParam.epochs = 10;
net = train(net,p,t);
Y=sim(net,p)
these is what i got when i compile it
[0.9794] [0.9974] [1.2784] [1.0014] [1.0058] [0.9904] [0.7293] [1.0001] [1.0106]
Columns 10 through 15
[1.0002] [0.0618] [3.3131e-04] [9.9559e-04] [0.0134] [0.0178]
then my problem is what should i do to make the result success i train in percentage with error below 1% (what i want: example i train 10 true image to 1 and one result of my train is 0.798 then accurate =90%) thanks for the help.

採用された回答

Greg Heath
Greg Heath 2013 年 12 月 19 日
There is no reason to use cells or only train for 10 epochs.
Use round to convert the output to {0,1}
Thank you for formally accepting my answer
Greg
  5 件のコメント
Greg Heath
Greg Heath 2013 年 12 月 19 日
whos P
size(P)
Parkz Leingodz
Parkz Leingodz 2013 年 12 月 20 日
size P is 16x21 pixels.
P is a matrix that save whole matrix value of img.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by