多层神经网络BP算法

Principles of training multi-layer neural network using backpropagation


The project describes teaching process of multi-layer neural network employing backpropagation algorithm. To illustrate this process the three layer neural network with two inputs and one output,which is shown in the picture below, is used:

Each neuron is composed of two units. First unit adds products of weights coefficients and input signals. The second unit realise nonlinear function, called neuron activation function. Signal e is adder output signal, and y = f(e) is output signal of nonlinear element. Signal y is also output signal of neuron.

To teach the neural network we need training data set. The training data set consists of input signals (x1 and x2 ) assigned with corresponding target (desired output) z. The network training is an iterative process. In each iteration weights coefficients of nodes are modified using new data from training data set. Modification is calculated using algorithm described below: Each teaching step starts with forcing both input signals from training set. After this stage we can determine output signals values for each neuron in each network layer. Pictures below illustrate how signal is propagating through the network, Symbols w(xm)nrepresent weights of connections between network input xm and neuron n in input layer. Symbols yn represents output signal of neuron n.

Propagation of signals through the hidden layer. Symbols wmn represent weights of connections between output of neuron m and input of neuron n in the next layer.

Propagation of signals through the output layer.

In the next algorithm step the output signal of the network y is compared with the desired output value (the target), which is found in training data set. The difference is called error signal d of output layer neuron.

It is impossible to compute error signal for internal neurons directly, because output values of these neurons are unknown. For many years the effective method for training multiplayer networks has been unknown. Only in the middle eighties the backpropagation algorithm has been worked out. The idea is to propagate error signal d (computed in single teaching step) back to all neurons, which output signals were input for discussed neuron.

The weights‘ coefficients wmn used to propagate errors back are equal to this used during computing output value. Only the direction of data flow is changed (signals are propagated from output to inputs one after the other). This technique is used for all network layers. If propagated errors came from few neurons they are added. The illustration is below:

When the error signal for each neuron is computed, the weights coefficients of each neuron input node may be modified. In formulas below df(e)/de represents derivative of neuron activation function (which weights are modified).

Coefficient h affects network teaching speed. There are a few techniques to select this parameter. The first method is to start teaching process with large value of the parameter. While weights coefficients are being established the parameter is being decreased gradually. The second, more complicated, method starts teaching with small parameter value. During the teaching process the parameter is being increased when the teaching is advanced and then decreased again in the final stage. Starting teaching process with low parameter value enables to determine weights coefficients signs.

References
Ryszard Tadeusiewcz "Sieci neuronowe", Kraków 1992

   
 

Mariusz Bernacki

Przemys?aw W?odarczyk

mgr in?. Adam Go?da (2005)
Katedra Elektroniki AGH

Last modified: 06.09.2004 
Webmaster

时间: 2024-08-30 05:25:47

多层神经网络BP算法的相关文章

多层神经网络BP算法 原理及推导

首先什么是人工神经网络?简单来说就是将单个感知器作为一个神经网络节点,然后用此类节点组成一个层次网络结构,我们称此网络即为人工神经网络(本人自己的理解).当网络的层次大于等于3层(输入层+隐藏层(大于等于1)+输出层)时,我们称之为多层人工神经网络. 1.神经单元的选择 那么我们应该使用什么样的感知器来作为神经网络节点呢?在上一篇文章我们介绍过感知器算法,但是直接使用的话会存在以下问题: 1)感知器训练法则中的输出 由于sign函数时非连续函数,这使得它不可微,因而不能使用上面的梯度下降算法来最

第5章 实现多层神经网络BP算法

前言 神经网络是一种很特别的解决问题的方法.本书将用最简单易懂的方式与读者一起从最简单开始,一步一步深入了解神经网络的基础算法.本书将尽量避开让人望而生畏的名词和数学概念,通过构造可以运行的Java程序来实践相关算法. 关注微信号"javaresearcher"来获取本书的更多信息. 上一章我们讨论了神经网络的表达能力的数学原理,这一章我们就来实现一个神经网络以及训练算法. 我们今天讨论类似下面的全连接多层单向神经网络: 我们把输入也看作一层,上图中一共有三层.输入和输出层是由问题的输

机器学习之神经网络bp算法推导

这是一篇学习UFLDL反向传导算法的笔记,按自己的思路捋了一遍,有不对的地方请大家指点. 首先说明一下神经网络的符号: 1. nl 表示神经网络的层数. 2. sl 表示第 l 层神经元个数,不包含偏置单元. 3. z(l)i 表示第 l 层第 i 个神经元的输入:a(l)i 表示第 l 层第 i 个神经元的输出. 4. W(l)ij 表示第 l 层第 j 个神经元连接到第 l+1 层第 i 个神经元的权重,因此权值矩阵 W 的维数为 sl+1 x sl 第二层各神经元的计算方法如下: a(2)

今天开始学Pattern Recognition and Machine Learning (PRML),章节5.2-5.3,Neural Networks神经网络训练(BP算法)

转载请注明出处:Bin的专栏,http://blog.csdn.net/xbinworld 这一篇是整个第五章的精华了,会重点介绍一下Neural Networks的训练方法--反向传播算法(backpropagation,BP),这个算法提出到现在近30年时间都没什么变化,可谓极其经典.也是deep learning的基石之一.还是老样子,下文基本是阅读笔记(句子翻译+自己理解),把书里的内容梳理一遍,也不为什么目的,记下来以后自己可以翻阅用. 5.2 Network Training 我们可

stanford coursera 机器学习编程作业 exercise4--使用BP算法训练神经网络以识别阿拉伯数字(0-9)

在这篇文章中,会实现一个BP(backpropagation)算法,并将之应用到手写的阿拉伯数字(0-9)的自动识别上. 训练数据集(training set)如下:一共有5000个训练实例(training instance),每个训练实例是一个400维特征的列向量(20*20 pixel image).用 X 矩阵表示整个训练集,则 X 是一个 5000*400 (5000行 400列)的矩阵 另外,还有一个5000*1的列向量 y ,用来标记训练数据集的结果.比如,第一个训练实例对应的输出

(转)神经网络和深度学习简史(第一部分):从感知机到BP算法

深度|神经网络和深度学习简史(第一部分):从感知机到BP算法 2016-01-23 机器之心 来自Andrey Kurenkov 作者:Andrey Kurenkov 机器之心编译出品 参与:chenxiaoqing.范娜Fiona.杨超.微胖.汪汪.赵巍 导读:这是<神经网络和深度学习简史>第一部分.这一部分,我们会介绍1958年感知机神经网络的诞生,70年代人工智能寒冬以及1986年BP算法让神经网络再度流行起来. 深度学习掀起海啸 如今,深度学习浪潮拍打计算机语言的海岸已有好几年,但是,

深度学习基础--神经网络--BP反向传播算法

BP算法: 1.是一种有监督学习算法,常被用来训练多层感知机.  2.要求每个人工神经元(即节点)所使用的激励函数必须可微. (激励函数:单个神经元的输入与输出之间的函数关系叫做激励函数.) (假如不使用激励函数,神经网络中的每层都只是做简单的线性变换,多层输入叠加后也还是线性变换.因为线性模型的表达能力不够,激励函数可以引入非线性因素) 下面两幅图分别为:无激励函数的神经网络和激励函数的神经网络 如图所示,加入非线性激活函数后的差异:上图为用线性组合逼近平滑曲线来分割平面,下图为使用平滑的曲线

RBF神经网络学习算法及与多层感知器的比较

对于RBF神经网络的原理已经在我的博文<机器学习之径向基神经网络(RBF NN)>中介绍过,这里不再重复.今天要介绍的是常用的RBF神经网络学习算法及RBF神经网络与多层感知器网络的对比. 一.RBF神经网络学习算法 广义的RBF神经网络结构如下图所示: N-M-L结构对应着N维输入,M个数据中心点centers,L个输出. RBF 网络常用学习算法 RBF 网络的设计包括结构设计和参数设计.结构设计主要解决如何确定网络隐节点数的问题.参数设计一般需考虑包括3种参数:各基函数的数据中心和扩展常

神经网络和BP算法C及python代码

以上仅给出了代码.具体BP实现原理及神经网络相关知识请见:神经网络和反向传播算法推导 首先是前向传播的计算: 输入: 首先为正整数 n.m.p.t,分别代表特征个数.训练样本个数.隐藏层神经元个数.输出 层神经元个数.其中(1<n<=100,1<m<=1000, 1<p<=100, 1<t<=10). 随后为 m 行,每行有 n+1 个整数.每行代表一个样本中的 n 个特征值 (x 1 , x 2 ,..., x n ) 与样本的 实际观测结果 y.特征值的