Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在MATLAB中设置newff(神经网络工具箱函数)?_Matlab_Neural Network - Fatal编程技术网

如何在MATLAB中设置newff(神经网络工具箱函数)?

如何在MATLAB中设置newff(神经网络工具箱函数)?,matlab,neural-network,Matlab,Neural Network,我运行简单代码后出错。谢谢 这是我的密码 input_training_data = HandWritingData(random_list,:)'; %size = [256X788] target_training_data = Category(random_list,:)'; %size = [10x788] net = newff(minmax(input_training_data), [15 10], {'logsig','logsig'} , 'hardlim' ); E

我运行简单代码后出错。谢谢

这是我的密码

input_training_data = HandWritingData(random_list,:)'; %size = [256X788]
target_training_data = Category(random_list,:)'; %size = [10x788]
net = newff(minmax(input_training_data), [15 10], {'logsig','logsig'} , 'hardlim' ); 



Error in ==> Neural_Network_code at 19 
net = newff(minmax(input_training_data), [15 10],
{'logsig','logsig'} , 'hardlim' ); %create a network 

您不想使用newff,但使用RTFM的原因有很多:

newff创建一个前馈反向传播网络

R2010b NNET 7.0中已淘汰。最后在R2010a NNET 6.0.4中使用。 推荐的功能是feedforwardnet

语法

 net = newff(P,T,S)
 net = newff(P,T,S,TF,BTF,BLF,PF,IPF,OPF,DDF)
描述

 newff(P,T,S) takes,
   P  - RxQ1 matrix of Q1 representative R-element input vectors.
   T  - SNxQ2 matrix of Q2 representative SN-element target vectors.
   Si  - Sizes of N-1 hidden layers, S1 to S(N-1), default = [].
         (Output layer size SN is determined from T.)
 and returns an N layer feed-forward backprop network.

 newff(P,T,S,TF,BTF,BLF,PF,IPF,OPF,DDF) takes optional inputs,
   TFi - Transfer function of ith layer. Default is 'tansig' for
         hidden layers, and 'purelin' for output layer.
   BTF - Backprop network training function, default = 'trainlm'.
   BLF - Backprop weight/bias learning function, default = 'learngdm'.
   PF  - Performance function, default = 'mse'.
   IPF - Row cell array of input processing functions.
         Default is {'fixunknowns','remconstantrows','mapminmax'}.
   OPF - Row cell array of output processing functions.
         Default is {'remconstantrows','mapminmax'}.
   DDF - Data division function, default = 'dividerand';
 and returns an N layer feed-forward backprop network.
hardlim不是传递函数。使用trainbg的trainlm

net = newff(minmax(input_training_data), [15 10], {'logsig','logsig'} , 'trainlm' );

如果我不应该使用newff,您有什么建议?matlab文档建议使用feedforwardnet()。您也可以使用network(),对于更专业的东西,如级联网络,您应该使用查看文档。