声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1670|回复: 1

[工具箱] [求助]Targets are incorrectly sized for network

[复制链接]
发表于 2006-4-11 17:58 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
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),[10,6,2],{'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 很菜,不知道怎么改,望乞高人指教,不胜感激!
回复
分享到:

使用道具 举报

发表于 2006-4-11 21:08 | 显示全部楼层
p,t都转置一下
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-12 23:57 , Processed in 0.061455 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表