作者g318 (^___^)
看板MATLAB
标题[讨论] newff辨视圆
时间Mon Feb 11 12:18:29 2019
大家好,
我是上几篇要找圆的,
有好心人叫我用类神经找圆,
我努力用了,
但为什麽跑不动?
matlab跑出说这行有问题[net,tr]=train(net,p,t);
有些贴上字题有问题请见谅
请教matlab强者,
我写的那有问题?
谢谢
<( _ _ )>
t1.jpg
t2.jpg
是训练的圆图档
======
clear all;
%define the input and output
s=imread('t1.jpg');
for m=1:6300
p(m,1)=s(m);
end
s=imread('t2.jpg');
for m=1:6300
p(m,2)=s(m);
end
s=imread('t3.jpg');
for m=1:6300
p(m,3)=s(m);
end
t=[1 1 1 ];
net=newff(p,t,[24,1],{'tansig' 'purelin'},'trainlm');
net.trainparam.goal=50;
net.trainparam.epochs=5000;
[net,tr]=train(net,p,t);
iw1=net.IW{1};
b1=net.b{1};
lw2=net.LW{2};
b2=net.b{2};
save netkohler net
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 27.52.166.236
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/MATLAB/M.1549858711.A.097.html
※ 编辑: g318 (27.52.166.236), 02/11/2019 12:19:32