PDA

查看完整版本 : 【求助】神经网络 结果问题:performance goal was not met


tigris
2007-05-25, 19:26
我的程序
clear
P=[500 300 40;750 350 40;940 400 40;1200 480 40;
1700 600 60;2100 850 60;2700 1250 60;3100 1650 60;
3350 1850 80;3500 2200 80;3700 2400 80;3900 2200 80;]';
T=[0;45;45;115;
160;245;245;315;
385;385;385;385;]';
u=T;
for i=1:3
P(i,=(P(i,-min(P(i,))/(max(P(i,)-min(P(i,));
end
for i=1:1
T(i,: )=(T(i,: )-min(T(i,: )))/(max(T(i,: ))-min(T(i,: )));
end

net=newff(minmax(P),[12,10,17,1],{'tansig','purelin','purelin','purelin'},'traingd'); % @@@@
net.trainParam.show=50;
net.trainParam.epochs=2000;
net.trainParam.goal=0.1;
net.trainParam.lr=0.1;
net=train(net,P,T);
P_test=[500 300 40;750 350 40;940 400 40;1200 480 40;
1700 600 60;2100 850 60;2700 1250 60;3100 1650 60;
3350 1850 80;3500 2200 80;3700 2400 80;3900 2200 80;]'; %@@@@
out=sim(net,P_test);

for i=1:1
predict(i)=out(i)* (max(u(i,:))-min(u(i,:)))+ min(u(i,:));
end
predict



pause
plot(P,T,'r')
hold on
plot(P,predict,'b')
hold off




运行后,命令窗口出现语句
TRAINGD, Maximum epoch reached, performance goal was not met.


predict =

NaN


看不懂 谁知道吗?

ciji1995
2007-05-26, 10:30
不知道你要实现什么功能,也没有注释,这样的程序不好看啊:confused:

一江春水
2008-03-17, 19:54
TRAINGD, Maximum epoch reached, performance goal was not met
的意思是 最大训练次数到了,但是没有达到要求的误差范围,
你把epoch的值改大一点就可以了。