各位大蝦,我在網(wǎng)上看到的教程里的一個程序段,本來想要試試看的: Py#iC#g~
net=newff([-1 2; 0 5],[3,1],{'tansig','purelin'},'traingd'); _ 4+=S)$
net.trainParam.show = 50; :,=Z)e
net.trainParam.lr = 0.05; 7R".$ p
net.trainParam.epochs = 300; e
irRAU
net.trainParam.goal = 1e-5; JLV?n,nF
p = [-1 -1 2 2;0 5 0 5]; 8\8%FSrc
t = [-1 -1 1 1]; *wJ'Z4_5F
net=train(net,p,t); ktK/s!bgY
TRAINGD, Epoch 0/300, MSE 1.59423/1e-05, Gradient 2.76799/1e-10 =|bW >y
TRAINGD, Epoch 50/300, MSE 0.00236382/1e-05, Gradient 0.0495292/1e-10 pXHeUBY.
TRAINGD, Epoch 100/300, MSE 0.000435947/1e-05, Gradient 0.0161202/1e-10 y1hJVYE2
TRAINGD, Epoch 150/300, MSE 8.68462e-05/1e-05, Gradient 0.00769588/1e-10 Gh9dv|m=[;
TRAINGD, Epoch 200/300, MSE 1.45042e-05/1e-05, Gradient 0.00325667/1e-10 BGVy
\F<
TRAINGD, Epoch 211/300, MSE 9.64816e-06/1e-05, Gradient 0.00266775/1e-10 }#U3vMx(
TRAINGD, Performance goal met. gc{5/U9H*
a = sim(net,p) G3t
4$3|
plot(p,t,p,a,'o') E{6X-C[)v
但是為什么老是報錯: *g/@-6
??? Input argument "net" is undefined. 9:6d,^X