MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [原创]matlab实现BP (https://www.labfans.com/bbs/showthread.php?t=3106)

kook666151 2008-05-19 09:54

[原创]matlab实现BP
 
写了段MATLAB 实现BP的算法,如下:
clear all;
a=xlsread('E:\production\训练数据');
b=xlsread('E:\production\训练产量数据');

p=str2double(a);
t=str2double(b);

net=newff(minmax(p),[8,8,1],{'tansig','logsig','purelin'},'traingdm') ;
net.trainParam.show=50;
net.trainParam.lr=0.05;
net.trainParam.epochs=10000;
net.trainParam.goal=0.001;
[net,tr]=train(net,p,t);

c = sim(net,p);

save E:\production\产量数据.xls c -ASCII;

可是运行结果为:
TRAINGDM-calcgrad, Epoch 0/10000, MSE 0/0.001, Gradient NaN/1e-010
TRAINGDM, Performance goal met.

在产量数据.xls中的输入值为NaN

这咋回事
请路过的大虾帮忙看看


所有时间均为北京时间。现在的时间是 15:31

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.