-
BP网络的C/C++实现,含有详细代码和例子,适合初学者
应用背景人工神经网络(ANN)中关于反向传播算法的内容,相比单个感知器而言,采用多层网络的反向传播算法能表示出更多种类的非线性曲面,整个神经网络可以分成三层:输入层,隐藏层,输出层,通过加权线性变换,层与层之间的传递,最终得到输入层的实数值。关键技术
本人根据附件里面的文章编写的反向传播算法代码,里面含有详细的代码注释和文章例子, 可以让初学者深刻理解反向传播算法,适合初学者学习。给出BP算法训练的例子,对单个样本的训练的情况进行编写和验证。
//输入层到隐层的过程
float fNetj[m];
for (int j= 0;j < m; j++){
fNetj[j] = fTheta[n][j]; //这里权值矩阵最后一列是偏置,偏置×1还是偏置,所以直接加上,
//后面就不用乘了
for(int i = 0;i < n; i++){ //得到netj 的值 netj= X^V
fNetj[j] +=fInputdata[i]*fTheta[i][j];
}
fMidResult[j] = 1/(1 + exp(-fNetj[j]));
//cout
- 2022-08-03 01:10:12下载
- 积分:1
-
Huffman编码1. 给出信源符号的一阶概率分布,并计算信源符号熵和单字符Huffman码表。2. 计算每信源的平均字长,并与信源符号熵比较。3. 比较压缩效...
Huffman编码1. 给出信源符号的一阶概率分布,并计算信源符号熵和单字符Huffman码表。2. 计算每信源的平均字长,并与信源符号熵比较。3. 比较压缩效果。-Huffman coding 1. Source symbols are given first-order probability distribution, and calculate the entropy source and single-character symbols Huffman code table. 2. Calculated the average per source word length, and entropy source comparison symbols. 3. Comparison of the effect of compression.
- 2022-02-26 21:59:11下载
- 积分:1
-
8051单片机实现fft频谱
8051单片机实现fft频谱,有fft快速傅里叶变换实现频谱显示,16x8点阵。
- 2022-05-09 09:13:24下载
- 积分:1
-
使用嵌入式零树小波的图像压缩算法
这是使用嵌入式零树小波的图像压缩算法。它用于在小波域中。这种算法是非常有效和有用在图像处理中。
- 2022-01-25 20:52:54下载
- 积分:1
-
文件MD5 生产算法
char *MD5_file (char *path, int md5_len)
{
FILE *fp = fopen (path, "rb");
MD5_CTX mdContext;
int bytes;
unsigned char data[1024];
char *file_md5;
int i;
if (fp == NULL) {
fprintf (stderr, "fopen %s failed
", path);
return NULL;
}
MD5Init (&mdContext);
while ((bytes = fread (data, 1, 1024, fp)) != 0)
{
MD5Update (&mdContext, data, bytes);
}
MD5Final (&mdContext);
file_md5 = (char
- 2022-07-11 22:12:17下载
- 积分:1
-
是自己在ECPLISE下做的一个简单的排序程序,有兴趣的可以看下....
是自己在ECPLISE下做的一个简单的排序程序,有兴趣的可以看下.-in ECPLISE is done with the sort of a simple procedure that can be interested in a glance.
- 2023-01-09 01:50:04下载
- 积分:1
-
差分进化算法
Differential evolution: A simple and efficient heuristic for global optimization over continuous spaces.
This code implements a basic multi-objective optimization algorithm based on Diferential Evolution (DE) algorithm. When one objective is optimized, the standard DE runs; if two or more objectives are optimized, the greedy selection step in DE algorithm is performed using a dominance relation.
- 2022-07-08 18:06:29下载
- 积分:1
-
非线性方程不能消除和分解方法求解,…
非线性方程组不能用消去和分解法进行求解,jacabi迭代和高斯迭代是最常用的两种迭代方法-Nonlinear equations can not be eliminated and the decomposition method to solve, jacabi iteration and Gauss iteration is the most commonly used two types of iterative methods
- 2022-01-26 07:01:24下载
- 积分:1
-
cc1100send-and-receive
P1DIR |= 0x03; //P1_0, p1_1, OUTPUT
CLKCON &= ~0x40; //晶振
while(!(SLEEP & 0x40)); //等待晶振稳定
CLKCON &= ~0x47; //TICHSPD128分频,CLKSPD不分频
SLEEP |= 0x04; //关闭不用的RC振荡器
//Initkey();
Init_T1();
InitUART(9600); //初始化串口
请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2022-03-23 14:42:43下载
- 积分:1
-
adasdasdasd
- 2022-07-26 00:54:54下载
- 积分:1