[求助]Targets are incorrectly sized for network
p=[0.7,0.3,0.9,0.7,0.34,0.5,0.7,0.65,0.7,0.7;0.5,0.1,0.1,0.5,0.46,0.7,0.1,0.10,0.1,0.1;
0.5,0.1,0.1,0.5,0.18,0.5,0.1,0.10,0.1,0.1;
0.7,0.7,0.5,0.7,0.30,0.7,0.9,0.65,0.1,0.7;
0.9,0.1,0.5,0.9,0.46,0.1,0.7,0.90,0.1,0.5;
0.5,0.7,0.5,0.5,0.26,0.5,0.3,0.10,0.1,0.5;
0.7,0.7,0.9,0.9,0.22,0.7,0.7,0.10,0.1,0.5;
0.7,0.1,0.1,0.7,0.78,0.3,0.1,0.10,0.3,0.1;
0.7,0.1,0.7,0.1,0.22,0.3,0.1,0.10,0.1,0.9;
0.7,0.1,0.7,0.7,0.18,0.9,0.1,0.10,0.1,0.9;
0.7,0.7,0.7,0.9,0.38,0.9,0.9,0.65,0.1,0.7;
0.5,0.3,0.1,0.7,0.50,0.1,0.7,0.65,0.1,0.9;
0.5,0.3,0.5,0.7,0.26,0.3,0.7,0.65,0.3,0.7;
0.9,0.3,0.7,0.9,0.46,0.7,0.9,0.90,0.1,0.7;
0.7,0.3,0.7,0.9,0.90,0.9,0.9,0.90,0.1,0.1;
0.7,0.5,0.7,0.9,0.70,0.7,0.7,0.10,0.1,0.1;
0.3,0.3,0.3,0.5,0.70,0.3,0.1,0.10,0.1,0.1;
0.7,0.3,0.9,0.9,0.38,0.5,0.7,0.10,0.1,0.1;
0.9,0.3,0.5,0.7,0.90,0.7,0.9,0.90,0.1,0.1;
0.7,0.5,0.3,0.7,0.58,0.5,0.9,0.90,0.1,0.1];
t=[0.85,0;1.10,1;1.36,1;0.94,0;0.75,0;1.57,1;0.87,0;1.45,1;1.78,1;1.38,1;0.91,0;1.35,1;
1.04,1;0.78,0;0.75,0;0.97,0;2.1,1;0.95,0;0.90,0;0.94,0];
net=newff(minmax(p),,{'logsig','logsig','logsig'},'trainlm')
net.trainParam.epochs=10000;
net.trainParam.goal=1e-5;
net.trainParam.show=50;
net.trainParam.lr=0.02;
net.trainParam.lr_inc=1.04;
net.trainParam.lr_dec=0.7;
net=train(net,p,t)
这是振动上另一位网友编的,初学试了一下。 每次都出错 英文解释是:
??? Error using ==> network.train
Targets are incorrectly sized for network.
Matrix must have 2 rows.
我懂英文,可matlab 很菜,不知道怎么改,望乞高人指教,不胜感激!
p,t都转置一下
页:
[1]