早教吧 育儿知识 作业答案 考试题库 百科 知识分享

[net,tr]=train(net,P,T)这句在运行时总是说矩阵的行数或列数不正确是为什么啊?P=0.73150.03490.22740.72790.08060.26610.72320.14710.27310.64460.29720.28130.63190.35580.28500.63160.39340.31380.71220.07330.23210.6900

题目详情
[net,tr] = train(net,P,T)这句在运行时总是说矩阵的行数或列数不正确是为什么啊?
P =
0.7315 0.0349 0.2274
0.7279 0.0806 0.2661
0.7232 0.1471 0.2731
0.6446 0.2972 0.2813
0.6319 0.3558 0.2850
0.6316 0.3934 0.3138
0.7122 0.0733 0.2321
0.6900 0.1678 0.2973
0.6034 0.4790 0.3123
0.5949 0.5359 0.3309
0.5357 0.6949 0.4306
0.7158 0.1207 0.3840
0.6572 0.3405 0.4908
0.4440 0.7645 0.5211
0.3938 0.8784 0.5721
0.3470 0.9737 0.6928
0.6067 0.4845 0.3501
0.5952 0.5037 0.3625
0.5709 0.5938 0.3639
0.5392 0.6671 0.4061
0.5838 0.4604 0.3800
0.5791 0.6383 0.4341
0.4141 0.7847 0.5614
0.3770 0.8845 0.6196
0.5338 0.7170 0.4953
0.5228 0.7648 0.5210
0.3692 0.8050 0.5230
0.3368 0.9685 0.6774
T =
1.0000 0 0 0
0.8000 0.2000 0 0
0.6000 0.4000 0 0
0.4000 0.6000 0 0
0.2000 0.8000 0 0
0 1.0000 0 0
0.8000 0 0.2000 0
0.6000 0 0.4000 0
0.4000 0 0.6000 0
0.2000 0 0.8000 0
0 0 1.0000 0
0.8000 0 0 0.2000
0.6000 0 0 0.4000
0.4000 0 0 0.6000
0.2000 0 0 0.8000
0 0 0 1.0000
0 0.8000 0.2000 0
0 0.6000 0.4000 0
0 0.4000 0.6000 0
0 0.2000 0.8000 0
0 0.8000 0 0.2000
0 0.6000 0 0.4000
0 0.4000 0 0.6000
0 0.2000 0 0.8000
0 0 0.8000 0.2000
0 0 0.6000 0.4000
0 0 0.4000 0.6000
0 0 0.2000 0.8000
net=newff(minmax(P),[28],{'logsig','purelin'},'trainlm')
>> [net,tr]=train(net,P,T)
Error using ==> network.train
Targets are incorrectly sized for network.
Matrix must have 3 columns.
▼优质解答
答案和解析
肯定是不正确的.首先是错误信息里面已经说得很明白了Targets are incorrectly sized for network.Matrix must have 3 columns.你的T有四列,应该只有三列.神经网络输入和输出训练样本用列来体现,一列是一个输入,一列...