- 4
- 0
- 约1.06万字
- 约 11页
- 2019-07-20 发布于湖北
- 举报
PAGE
神经网络BP算法(C程序)
文件输入输出目录为:F:\BP\
训练样本文件名:训练样本.txt
值为:
1 1 -1 1 -1 1 0 1 0 1
输出文件名为:阈值.txt??? 权值.txt
=========================
#include stdlib.h#include math.h#include conio.h#include stdio.h#define N 2 /*/学习样本个数*/#define IN 3 /*/输入层神经元数目*/#define HN 3 /*/隐层神经元数目*/#define ON 2 /*/输出层神经元数目*/#define Z 20 /*旧权值保存,每次study的权值都保存下来*/double P[IN]; /*单个样本输入数据*/double T[ON]; /*单个样本输出数据*/double W[HN][IN]; /*/输入层至隐层权值*/double V[ON][HN]; /*/隐层至输出层权值*/double X[HN]; /*/隐层的输入*/double Y[ON]; /*/输出层的输入*/double H[HN]; /*/隐层的输出*/double O[ON]; /*/输出层的输出*/double YU
原创力文档

文档评论(0)