关于matlab中的神经网络问题p2 =Columns 1 through 1510.3547 6.5132 11.5884 9.0937 12.1231 9.7305 9.2718 12.0138 14.7256 8.2118 15.5248 9.4856 7.0331 8.2986 15.12739.5938 21.5208 8.5775 9.7130 8.4882 8.6062 9.3576 8.3573 6.9854 11.4787 7.2933
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 03:16:16
关于matlab中的神经网络问题p2 =Columns 1 through 1510.3547 6.5132 11.5884 9.0937 12.1231 9.7305 9.2718 12.0138 14.7256 8.2118 15.5248 9.4856 7.0331 8.2986 15.12739.5938 21.5208 8.5775 9.7130 8.4882 8.6062 9.3576 8.3573 6.9854 11.4787 7.2933
关于matlab中的神经网络问题
p2 =
Columns 1 through 15
10.3547 6.5132 11.5884 9.0937 12.1231 9.7305 9.2718 12.0138 14.7256 8.2118 15.5248 9.4856 7.0331 8.2986 15.1273
9.5938 21.5208 8.5775 9.7130 8.4882 8.6062 9.3576 8.3573 6.9854 11.4787 7.2933 8.6076 15.5258 12.4651 7.0822
Columns 16 through 30
14.8087 23.6421 6.0581 20.4587 7.1942 23.8723 9.0817 11.5870 7.7996 25.0767 7.5711 18.7319 6.9550 8.0761 8.8435
7.2593 6.2705 23.3829 6.5035 15.9076 6.2138 10.2243 8.7950 13.2521 6.2182 14.6978 6.5399 17.7876 12.9900 10.7082
Columns 31 through 33
10.6579 6.0759 20.5206
8.3639 24.7947 6.5797
t2 =
Columns 1 through 15
49.5501 90.0034 20.8415 61.8249 9.7315 67.7766 75.0265 90.8393 18.4378 25.9050 73.1686 34.7021 27.0085 26.0106 23.0541
84.8077 87.6767 74.2318 85.1866 34.1156 94.6325 18.0468 74.0764 43.0147 18.5151 59.4235 52.3822 8.8075 20.4177 51.2638
Columns 16 through 30
18.9169 72.0445 78.1773 32.3433 0.6327 91.9820 68.5819 40.0343 76.3430 69.6676 60.1632 62.4337 20.0080 66.1757 85.5082
3.1980 99.4590 38.8818 9.3058 76.9212 50.6772 25.3198 24.3151 79.0716 61.9660 26.6020 61.0964 67.1891 80.4363 31.2752
Columns 31 through 33
51.8444 48.1827 82.4095
34.3136 39.1259 59.6381
NN2=train(net2,p2,t2)
Error using ==> network.train at 228
Inputs are incorrectly sized for network.
Matrix must have 1 rows.
请问,我训练神经网络的时候为什么会报这样的错误呢?
net2=newff([0 100],[500,2],{'logsig','purelin'},'traincgf')
关于matlab中的神经网络问题p2 =Columns 1 through 1510.3547 6.5132 11.5884 9.0937 12.1231 9.7305 9.2718 12.0138 14.7256 8.2118 15.5248 9.4856 7.0331 8.2986 15.12739.5938 21.5208 8.5775 9.7130 8.4882 8.6062 9.3576 8.3573 6.9854 11.4787 7.2933
Matrix must have 1 rows.就是说让你输入一个一行的矩阵.
你的输入矩阵是两行,33列,而你建立的网络的输入层是一行,就是[0 100]这个参数,这个参数矩阵的行数应该与输入矩阵的行数相同,你这个例子中就必须是2行,比如[0 100;0 100].
另说一句,通常这个参数的最大值和最小值都在-1,1之间选择,输入矩阵也往往用minmax函数映射到[-1,1]区间内.