声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

12
返回列表 发新帖
楼主: caochongwen

[综合讨论] BP网络每次的结果都不一样

[复制链接]
发表于 2006-8-18 10:58 | 显示全部楼层
给权值阀值赋值
inputWeights=[3.122779048171,2.255821869611891,3.799706272202788,-3.66328379887522,-0.545092237633623,3.850681563493402,-0.538975079106648,-0.718962003134425,10.03521227649018;-1.761375571152317,-0.366494400559514,3.435168067936286,-2.847417329424111,4.048425174977655,-5.166011915728258,-0.808441534152644,2.009610223607288,4.775194687923136;1.107981076557102,1.211046317885484,-1.170341820738418,-4.56860778268783,-0.504666633461631,3.08599919324985,-1.264138669177781,3.12492704492211,-7.455148571649823;-0.15386210628244,3.241862547606278,5.434479737455827,1.665920020629382,-1.277867959435772,-2.171602576084157,0.795321280377629,0.875055964684542,-10.49968887649099;2.753069487724973,3.002435347684374,-3.912241229692641,-2.343761064008628,3.486003720320172,3.832166731664813,-0.551788335179388,-0.020667647287911,-5.082847232930414;2.719543971255148,2.500544231721904,-1.92012347156305,-4.569796167767257,0.373491608559365,0.047912726851151,0.171939918021146,3.534398983839914,1.608614128681488;-0.310499859136641,-2.336053730703718,2.809395211360493,-5.05561448959479,-3.035195653935498,2.452668883245069,-0.990174303405127,1.954685186786508,7.369234137822707;-3.856961827394375,-0.764153619600216,-4.938094828722757,2.890682595198744,1.973300336924911,-0.935046743803598,0.630338068416335,0.989062647616526,-6.949538054496057;]
inputbias=[-9.854436918404796;3.570030805596352;-1.773581770780901;-4.557901632847051;-5.862101554924009;-6.635235020149124;2.115174813461072;4.275858630573478;]
layerWeights=[0.676992089876161,0.136144922015552,-0.259172886735767,0.405479826480754,0.093142303658212,-0.110239590654176,0.389134480851095,0.242620261590827;]
layerbias=[0.589642160401853;]


inputWeights=net.IW{1,1}
inputbias=net.b{1}
layerWeights=net.LW{2,1}
layerbias=net.b{2}

想问一下这个是不是矛盾的?前面部分已经自己定义了初始的权值和阈值,那么后面怎么又将权值和阈值改为系统随机赋得得值啊?
回复 支持 反对
分享到:

使用道具 举报

发表于 2006-8-18 12:23 | 显示全部楼层
我的印象中,好像就应该是不一样的吧
发表于 2006-8-18 16:25 | 显示全部楼层
给完整的代码
发表于 2006-8-22 10:17 | 显示全部楼层
数据没做归一化,网络做不到收敛当然出现很大的误差!~虽然只有几个数字,必须要做!~

评分

1

查看全部评分

 楼主| 发表于 2006-9-17 15:09 | 显示全部楼层
我得到理想的网络后,权值阀值已确定,如何得到p与t之间的关系式,
代码如何编写呢?
发表于 2006-9-17 18:38 | 显示全部楼层
原帖由 caochongwen 于 2006-9-17 15:09 发表
我得到理想的网络后,权值阀值已确定,如何得到p与t之间的关系式,
代码如何编写呢?

找到比较好的权值阀值,保存网络吧,这就相当于保存了权值阀值
save filename net;保存网络就行了。调用时用命令load filename net;
接下来就可以用sim来测试不是训练过的数据了
p和t的关系调用sim的话就没必要自己编,自己编也是挺简单的,就是几个循环拉
t=f(wp+b)
一般有两层的

评分

1

查看全部评分

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-11-25 09:52 , Processed in 0.074366 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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