资源简介
根据水果的属性来识别水果的种类,结构简单,操作简便
代码片段和文件信息
#include“bp_rbf.h“
double randnumber()//-0.1~0.1的随机函数
{
return (sin(rand())/10) ;
}
//求某个节点的输出值
double f(int nodeint layer){
double sum=0;
for (int node2=0;node2yer-1];node2++)
{
sum=sum+w[layer][node][node2]*u[layer-1][node2];
}
sum=1.0/(1+exp(0-sum));
return sum;
}
//求误差函数对u的导数
double gf(int layerint node){
double sum=0;
for (int m=0;myer+1];m++)
sum=sum+e[layer+1][m]*u[layer+1][m]*(1-u[layer+1][m])*w[layer+1][m][node];
return sum;
}
//求前馈
void feed_forward()//前馈输出值
{
for (int layer=1;layer<=2;layer++)
for(int node=0;nodeyer];node++)
u[layer][node]=f(nodelayer);
}
//求梯度
void compute_gradient()
{
for (int layer=2;layer>0;layer--)
{
for(int node=0;nodeyer];node++)
{
if (layer==2) e[2][node]=u[2][node
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4383 2007-12-28 20:51 水果智能识别系统\bisheji.dsp
文件 537 2005-05-17 08:52 水果智能识别系统\bisheji.dsw
文件 66560 2008-01-15 09:53 水果智能识别系统\bisheji.ncb
文件 53760 2008-01-15 09:53 水果智能识别系统\bisheji.opt
文件 248 2008-01-14 16:23 水果智能识别系统\bisheji.plg
文件 1367 2008-01-14 16:10 水果智能识别系统\bp_rbf.h
文件 20758 2008-01-14 16:20 水果智能识别系统\bp结果\权值.txt
文件 734 2008-01-14 16:20 水果智能识别系统\bp结果\误差变化序列.txt
文件 278604 2008-01-14 16:10 水果智能识别系统\Debug\bisheji.exe
文件 623616 2008-01-14 16:10 水果智能识别系统\Debug\bisheji.pdb
文件 48618 2008-01-14 16:10 水果智能识别系统\Debug\mainApp.obj
文件 0 2008-01-14 16:10 水果智能识别系统\Debug\mainApp.sbr
文件 4927 2007-12-28 12:57 水果智能识别系统\Debug\rbf.obj
文件 110592 2008-01-14 16:10 水果智能识别系统\Debug\vc60.pdb
文件 13200 2007-12-28 20:54 水果智能识别系统\mainApp.cpp
文件 3559 2005-05-18 09:14 水果智能识别系统\matrix_op.h
文件 78 2005-05-23 09:40 水果智能识别系统\rbf.cpp
文件 20319 2008-01-14 16:21 水果智能识别系统\rbf结果\权值.txt
文件 306074 2008-01-14 16:21 水果智能识别系统\rbf结果\误差.txt
文件 21550 2008-01-14 16:09 水果智能识别系统\study.txt
文件 7182 2008-01-14 16:10 水果智能识别系统\test.txt
目录 0 2009-02-16 22:57 水果智能识别系统\bp结果
目录 0 2009-02-16 22:57 水果智能识别系统\Debug
目录 0 2009-02-16 22:57 水果智能识别系统\rbf结果
目录 0 2009-02-16 22:57 水果智能识别系统
----------- --------- ---------- ----- ----
1586666 25
- 上一篇:s5pv210 led跑马灯
- 下一篇:计算机网络Ethereal实验答案
评论
共有 条评论