各位大蝦,我在網(wǎng)上看到的教程里的一個(gè)程序段,本來(lái)想要試試看的: %#iu
net=newff([-1 2; 0 5],[3,1],{'tansig','purelin'},'traingd'); l-<EG9m@
net.trainParam.show = 50; $#/f+kble
net.trainParam.lr = 0.05; L{Kl!
net.trainParam.epochs = 300;
B`wrr8"Rz
net.trainParam.goal = 1e-5; Y[Eq;a132
p = [-1 -1 2 2;0 5 0 5]; YK%rTbB(
t = [-1 -1 1 1]; V3c7F4\
net=train(net,p,t); Sgq?r-Q.
TRAINGD, Epoch 0/300, MSE 1.59423/1e-05, Gradient 2.76799/1e-10 ]1&}L^a
TRAINGD, Epoch 50/300, MSE 0.00236382/1e-05, Gradient 0.0495292/1e-10 M}x]\#MMY
TRAINGD, Epoch 100/300, MSE 0.000435947/1e-05, Gradient 0.0161202/1e-10 NNw0
G&
TRAINGD, Epoch 150/300, MSE 8.68462e-05/1e-05, Gradient 0.00769588/1e-10 !"<~n-$B
TRAINGD, Epoch 200/300, MSE 1.45042e-05/1e-05, Gradient 0.00325667/1e-10 Lf+"Gp
TRAINGD, Epoch 211/300, MSE 9.64816e-06/1e-05, Gradient 0.00266775/1e-10 ^wxpinJ>
TRAINGD, Performance goal met. 2./;i>H[u
a = sim(net,p) U*:E|'>
plot(p,t,p,a,'o') ^/fasl$#
但是為什么老是報(bào)錯(cuò): TeNPuY~WP
??? Input argument "net" is undefined. tZan1C%p>