Deep Learning:深度前馈神经网络(五)

来源:互联网 发布:mac下安装配置redis4 编辑:程序博客网 时间:2024/05/17 08:21

Back-Propagation and Other Differentiation Algorithms

  • Forward propagation: The inputs x provide the initial information that then propagates up to the hidden units at each layer and finally produces y^.
  • Back-propagation: allows the information from the cost to then flow backwards through the network, in order to compute the gradient.
  • The term back-propagation is often misunderstood as meaning the whole learning algorithm for multi-layer neural networks. Actually, back-propagation refers only to the method for computing the gradient, while another algorithm, such as stochastic gradient descent, is used to perform learning using this gradient.
  • In learning algorithms, the gradient we most often require is the gradient of the cost function with respect to the parameters, θJ(θ).

Computational Graphs

To describe the back-propagation algorithm more precisely, it is helpful to have a more precise computational graph language.

  • Here, we use each node in the graph to indicate a variable. The variable may be a scalar, vector, matrix, tensor, or even a variable of another type.
  • An operation is a simple function of one or more variables. Our graph language is accompanied by a set of allowable operations. Functions more complicated than the operations in this set may be described by composing many operations together.
    这里写图片描述

Chain Rule of Calculus

The chain rule of calculus (not to be confused with the chain rule of probability) is used to compute the derivatives of functions formed by composing other functions whose derivatives are known. Back-propagation is an algorithm that computes the chain rule, with a specific order of operations that is highly efficient.
Let x be a real number, and let f and g both be functions mapping from a real number to a real number. Suppose that y=g(x) and z=f(g(x))=f(y). Then the chain rule states that

dzdx=dzdydydx

We can generalize this beyond the scalar case:
zxi=jzyjyjx

In vector notation, this may be equivalently written as
xz=(yx)Tyz

where yx is the n × m Jacobian matrix of g.
From this we see that the gradient of a variable x can be obtained by multiplying a Jacobian matrix yx by a gradient yz

阅读全文
0 0
原创粉丝点击