BP神经网络matlab程序运行问题

来源:互联网 发布:卖家农村淘宝签约好吗 编辑:程序博客网 时间:2024/05/21 10:19

一、Inputs and targets have different numbers of samples. 

net = train(net,input,label);         

使用网络作非线性拟合。input:60 by 14731;label:14731 by 1.

解决方法:将label转置!!


二、Output data size does not match net.outputs{2}.size

net = newff(input,label,10,{'tansig','purelin'},'traingda');   此时label是14731 by 1的。

net = train(net,input,label');         将label转置后为1 by 14731

解决方法:

newff中认为列数是样本个数,显然newff中的label需要转置!


三、Function'subsindex' is not defined for values of class ‘network’

解决方法:

http://blog.sina.com.cn/s/blog_768123f801014kml.html

程序中不能出现以 train 命名的变量名。






原创粉丝点击