您不想使用 newff 的原因有很多,但是 RTFM:
newff 创建一个前馈反向传播网络。
在 R2010b NNET 7.0 中已废弃。最后在 R2010a NNET 6.0.4 中使用。
推荐的函数是前馈网络。
语法
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' );