|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
用newff建立BP网络的时候,如果用trainlm方法,即
net=newff([0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1],[9 6 2],{'tansig','logsig','purelin'},'trainlm');
是可以定义的,
可是如果把trainlm改为traingd,即
net=newff([0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1],[9 6 2],{'tansig','logsig','purelin'},'traingd');
则会产生错误,如下所示
Warning: feval on script names will not work, or may work differently,
in a future version of MATLAB. To make your code insensitive to any change
and to suppress this warning message:
- Either change the script to a function.
- Or use eval instead of feval.
The script file in question is traingd.
> In network.subsasgn>setTrainFcn at 1459
In network.subsasgn at 405
In newff at 160
??? Attempt to execute SCRIPT traingd as a function.
Error in ==> network.subsasgn>setTrainFcn at 1459
net.trainParam = feval(trainFcn,'pdefaults');
Error in ==> network.subsasgn at 405
[net,err]=setTrainFcn(net,trainFcn);
Error in ==> newff at 160
net.trainfcn = btf;
请问这是什么原因? |
|