神经网络向量化

From Ufldl

Jump to: navigation, search
(Forward propagation)
Line 2: Line 2:
初译:在本节,我们将引入神经网络的向量化。在前面关于神经网络介绍的章节中,我们已经给出了一个部分向量化的实现,这个实现在我们每次只有一个单一训练样本时是非常有效的。下边我们将要看看如何实现算法使得它能够同时处理多个训练样本。具体来讲,我们将针对正向传导、反向传导以及稀疏属性集的学习。
初译:在本节,我们将引入神经网络的向量化。在前面关于神经网络介绍的章节中,我们已经给出了一个部分向量化的实现,这个实现在我们每次只有一个单一训练样本时是非常有效的。下边我们将要看看如何实现算法使得它能够同时处理多个训练样本。具体来讲,我们将针对正向传导、反向传导以及稀疏属性集的学习。
 +
一审:在本节,我们将引入神经网络的向量化。在前面关于神经网络介绍的章节中,我们已经给出了一个部分向量化的实现,它在一次输入一个训练样本时是非常有效率的。下边我们看看如何实现同时处理多个训练样本。具体来讲,我们将把正向传导、反向传导这两个步骤以及稀疏特征集学习扩展到多训练样本版本。
一审:在本节,我们将引入神经网络的向量化。在前面关于神经网络介绍的章节中,我们已经给出了一个部分向量化的实现,它在一次输入一个训练样本时是非常有效率的。下边我们看看如何实现同时处理多个训练样本。具体来讲,我们将把正向传导、反向传导这两个步骤以及稀疏特征集学习扩展到多训练样本版本。
英文:
英文:
Line 25: Line 26:
This is a fairly efficient implementation for a single example. If we have <tt>m</tt> examples, then we would wrap a for loop around this.
This is a fairly efficient implementation for a single example. If we have <tt>m</tt> examples, then we would wrap a for loop around this.
-
初译:这对于单一训练样本是非常有效的一种实现,但是当我们需要考虑<tt>m</tt>个训练样本时,则需要对如上步骤增加for循环。
+
初译:这对于单一训练样本是非常有效的一种实现,但是当我们需要考虑<tt>m</tt>个训练样本时,则需要对如上步骤增加<tt>for</tt>循环。
-
一审:这可相当有效率地实现对单个样本的训练,但是当我们需要处理<tt>m</tt>个训练样本时,则需要把如上步骤包装进一个for循环中。
+
一审:这可相当有效率地实现对单个样本的训练,但是当我们需要处理<tt>m</tt>个训练样本时,则需要把如上步骤包装进一个<tt>for</tt>循环中。
Concretely, following the [[Logistic Regression Vectorization Example]], let the Matlab/Octave variable <tt>x</tt> be a matrix containing the training inputs, so that <tt>x(:,i)</tt> is the <math>\textstyle i</math>-th training example.  We can then implement forward propagation as:  
Concretely, following the [[Logistic Regression Vectorization Example]], let the Matlab/Octave variable <tt>x</tt> be a matrix containing the training inputs, so that <tt>x(:,i)</tt> is the <math>\textstyle i</math>-th training example.  We can then implement forward propagation as:  
Line 133: Line 134:
We now describe the main ideas behind vectorizing backpropagation.  Before reading this section, we strongly encourage you to carefully step through all the forward propagation code examples above to make sure you fully understand them.  In this text, we'll only sketch the details of how to vectorize backpropagation, and leave you to derive the details in the [[Exercise:Vectorization|Vectorization exercise]].  
We now describe the main ideas behind vectorizing backpropagation.  Before reading this section, we strongly encourage you to carefully step through all the forward propagation code examples above to make sure you fully understand them.  In this text, we'll only sketch the details of how to vectorize backpropagation, and leave you to derive the details in the [[Exercise:Vectorization|Vectorization exercise]].  
-
反向传导
+
==反向传导==
 +
 
初译:现在我们来描述反向传导向量化的做法。在阅读这一节之前,强烈建议各位筒子仔细阅读前面介绍的正向传导的例子代码确保你已经完全理解。下边我们只会对反向传导向量化给出细节的纲要,由你来通过[[向量化练习]]进行细节的推导。
初译:现在我们来描述反向传导向量化的做法。在阅读这一节之前,强烈建议各位筒子仔细阅读前面介绍的正向传导的例子代码确保你已经完全理解。下边我们只会对反向传导向量化给出细节的纲要,由你来通过[[向量化练习]]进行细节的推导。

Revision as of 02:30, 9 March 2013

Personal tools