声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1164|回复: 2

[编程技巧] 再发贴求助!请各位大虾帮帮我,期待你们的帮助啊!谢谢了啊!

[复制链接]
发表于 2006-6-23 23:04 | 显示全部楼层 |阅读模式

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

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

x
这是一个很简单的问题,可是我实在是不懂,就请各位大虾帮帮俺了,谢谢!<BR>
<P >原始输入数据如下</P>
<P ><FONT face="Times New Roman">3     0.3   1.6   0.4   0.1   0.05</FONT></P>
<P ><FONT face="Times New Roman">3     0.3   0.1   0.5   0.2   0.1</FONT></P>
<P ><FONT face="Times New Roman">3     0.3   0.8   0.7   0.4   0.3</FONT></P>
<P ><FONT face="Times New Roman">3     0.6   0.1   0.4   0.2   0.3</FONT></P>
<P ><FONT face="Times New Roman">3     0.6   0.8   0.5   0.4   0.05</FONT></P>
<P ><FONT face="Times New Roman">3     0.6   1.6   0.7   0.1   0.1</FONT></P>
<P ><FONT face="Times New Roman">3     1.2   0.8   0.4   0.4   0.1</FONT></P>
<P ><FONT face="Times New Roman">3     1.2   1.6   0.5   0.1   0.3</FONT></P>
<P ><FONT face="Times New Roman">4     1.2   0.1   0.7   0.2   0.05</FONT></P>
<P ><FONT face="Times New Roman">4     0.3   0.8   0.4   0.1   0.05</FONT></P>
<P ><FONT face="Times New Roman">4     0.3   1.6   0.5   0.2   0.1</FONT></P>
<P ><FONT face="Times New Roman">4     0.3   0.1   0.7   0.4   0.3</FONT></P>
<P ><FONT face="Times New Roman">4     0.6   1.6   0.4   0.2   0.3</FONT></P>
<P ><FONT face="Times New Roman">4     0.6   0.1   0.5   0.4   0.05</FONT></P>
<P ><FONT face="Times New Roman">4     0.6   0.8   0.7   0.1   0.1</FONT></P>
<P ><FONT face="Times New Roman">4     1.2   0.8   0.4   0.4   0.1</FONT></P>
<P ><FONT face="Times New Roman">4     1.2   1.6   0.5   0.1   0.3</FONT></P>
<P ><FONT face="Times New Roman">5     1.2   0.1   0.7   0.2   0.05</FONT></P>
<P ><FONT face="Times New Roman">5     0.3   1.6   0.4   0.1   0.05</FONT></P>
<P ><FONT face="Times New Roman">5     0.3   0.1   0.5   0.2   0.1</FONT></P>
<P ><FONT face="Times New Roman">5     0.3   0.8   0.7   0.4   0.3</FONT></P>
<P ><FONT face="Times New Roman">5     0.6   0.1   0.4   0.2   0.3</FONT></P>
<P ><FONT face="Times New Roman">5     0.6   0.8   0.5   0.4   0.05</FONT></P>
<P ><FONT face="Times New Roman">5     0.6   1.6   0.7   0.1   0.1</FONT></P>
<P ><FONT face="Times New Roman">5     1.2   0.8   0.4   0.4   0.1</FONT></P>
<P ><FONT face="Times New Roman">5     1.2   1.6   0.5   0.1   0.3</FONT></P>
<P ><FONT face="Times New Roman">5     1.2   0.1   0.7   0.2   0.05</FONT></P>
<P ><p><FONT face="Times New Roman"> </FONT></p></P>
<P >在选输入向量时用的如下方式,原始数据以<FONT face="Times New Roman">.mat</FONT>格式存放于<FONT face="Times New Roman">matlab</FONT>的<FONT face="Times New Roman">work</FONT>目录下,用<FONT face="Times New Roman">import</FONT>方式导入,导入后重命名为<FONT face="Times New Roman">p</FONT></P>
<P ><v:shapetype><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path connecttype="rect" gradientshapeok="t" extrusionok="f"></v:path><lock aspectratio="t" v:ext="edit"></lock></v:shapetype><v:shape><FONT face="Times New Roman"><v:imagedata></v:imagedata><w:wrap type="square" side="right"></w:wrap></FONT></v:shape><BR clear=all>这是原始输出向量,采用以下格式键盘输入</P>
<P ><FONT face="Times New Roman">[32.13 50.3; 32.27 13.7;</FONT></P>
<P ><FONT face="Times New Roman">29.93 63.0; 30.20 6.40;</FONT></P>
<P ><FONT face="Times New Roman">33.00 55.5; 30.90 69.0;</FONT></P>
<P ><FONT face="Times New Roman">29.60 53.6; 29.40 10.9;</FONT></P>
<P ><FONT face="Times New Roman">33.60 50.4; 34.10 68.7;</FONT></P>
<P ><FONT face="Times New Roman">33.22 18.7; 33.20 72.2;</FONT></P>
<P ><FONT face="Times New Roman">32.48 28.6; 33.55 60.1;</FONT></P>
<P ><FONT face="Times New Roman">28.95 5.60; 25.66 71.3;</FONT></P>
<P ><FONT face="Times New Roman">21.36 26.3; 24.30 61.2;</FONT></P>
<P ><FONT face="Times New Roman">24.84 4.40; 21.50 57.5;</FONT></P>
<P ><FONT face="Times New Roman">25.88 63.6; 23.14 54.0;</FONT></P>
<P ><FONT face="Times New Roman">24.30 68.3; 23.64 16.8]</FONT></P>
<P ><v:shape><v:imagedata><FONT face="Times New Roman"></FONT></v:imagedata></v:shape></P>
<P >然后定义<FONT face="Times New Roman">network</FONT>属性,如下,其中<FONT face="Times New Roman">input ranges </FONT>选的是<FONT face="Times New Roman">Get from p</FONT></P>
<P ><v:shape><v:imagedata><FONT face="Times New Roman"></FONT></v:imagedata></v:shape></P>
<P ><v:shape><v:imagedata><FONT face="Times New Roman"></FONT></v:imagedata></v:shape></P>
<P ><p><FONT face="Times New Roman"> </FONT></p></P>
<P ><p><FONT face="Times New Roman"> </FONT></p></P>
<P ><v:shape><v:imagedata><FONT face="Times New Roman"></FONT></v:imagedata></v:shape></P>
<P ><p><FONT face="Times New Roman"> </FONT></p></P>
<P >接着定义<FONT face="Times New Roman">Training Parameters</FONT>,然后点击<FONT face="Times New Roman">Train Network,</FONT>就出现如下错误</P>
<P ><p><FONT face="Times New Roman"> </FONT></p></P>
<P ><v:shape><v:imagedata><FONT face="Times New Roman"></FONT></v:imagedata></v:shape></P>
<P ><p><FONT face="Times New Roman"> </FONT></p></P>
<P >请各位大虾帮帮小弟,俺实在是不知道哪里错了,按提示所说是输出向量格式不对,但不知怎么改,请给俺指点一下迷津,谢谢!<FONT face="Times New Roman"> <BR>俺上次发的时候,有一位叫suffer的大虾告诉我把p和t转置一下,可还是不会。</FONT></P>
回复
分享到:

使用道具 举报

 楼主| 发表于 2006-6-23 23:08 | 显示全部楼层

回复:(yiumao)再发贴求助!请各位大虾帮帮我,期待...

忘了写上错误提示了 “Targets are incorrectly sized for network.Matrices must have 2 rows"
发表于 2006-6-26 20:10 | 显示全部楼层
你输入层和输出层各是几个神经元啊?按照你的错误提示应该是你的样本和神经元个数不对应啊。<BR><FONT face="Times New Roman">转置方法:P=P'</FONT>
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-9-25 11:18 , Processed in 0.055358 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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