神经网络

From Ufldl

Jump to: navigation, search
Line 85: Line 85:
【初译】在这个图中,我们用圆圈表示神经网络的输入。带有"+1"被称为偏置节点,对应着截距项。神经网络最左边的层被称为输入层,最右边的层被称为输出层(在这个例子中,只有一个节点)。中间层也称为隐层,因为它的值不能在训练样本中看到。我们的神经网络例子有3个输出节点(不包含偏置节点),3个隐层节点和1个输出节点。
【初译】在这个图中,我们用圆圈表示神经网络的输入。带有"+1"被称为偏置节点,对应着截距项。神经网络最左边的层被称为输入层,最右边的层被称为输出层(在这个例子中,只有一个节点)。中间层也称为隐层,因为它的值不能在训练样本中看到。我们的神经网络例子有3个输出节点(不包含偏置节点),3个隐层节点和1个输出节点。
 +
【一审】如图,我们使用圆圈来表示神经网络的输入,被标上“+1”的圆圈称为“偏置单元”,也就是截距项。神经网络最左边的一层叫做“输入层”,最右的一层叫做“输出层”(本例中,这层只有一个节点)。中间所有节点组成的一层叫做“隐藏层”,因为在样本集中并没有它的值。也可以说,以上神经网络的例子有3个“输入单元”(偏置单元不计在内),3个“隐藏单元”以及一个“输出单元”。
【一审】如图,我们使用圆圈来表示神经网络的输入,被标上“+1”的圆圈称为“偏置单元”,也就是截距项。神经网络最左边的一层叫做“输入层”,最右的一层叫做“输出层”(本例中,这层只有一个节点)。中间所有节点组成的一层叫做“隐藏层”,因为在样本集中并没有它的值。也可以说,以上神经网络的例子有3个“输入单元”(偏置单元不计在内),3个“隐藏单元”以及一个“输出单元”。
 +
【二审】如图,我们使用圆圈来表示神经网络的输入,被标上“+1”的圆圈称为“偏置单元”,也就是截距项。神经网络最左边的一层叫做“输入层”,最右的一层叫做“输出层”(本例中,输出层只有一个节点)。中间所有节点组成的一层叫做“隐藏层”,因为我们不能在训练集中观测到它们的值。同时可以看到,以上神经网络的例子有3个“输入单元”(偏置单元不计在内),3个“隐藏单元”以及一个“输出单元”。
【二审】如图,我们使用圆圈来表示神经网络的输入,被标上“+1”的圆圈称为“偏置单元”,也就是截距项。神经网络最左边的一层叫做“输入层”,最右的一层叫做“输出层”(本例中,输出层只有一个节点)。中间所有节点组成的一层叫做“隐藏层”,因为我们不能在训练集中观测到它们的值。同时可以看到,以上神经网络的例子有3个“输入单元”(偏置单元不计在内),3个“隐藏单元”以及一个“输出单元”。
【原文】We will let nl denote the number of layers in our network; thus nl = 3 in our example. We label layer as Ll, so layer L1 is the input layer, and layer the output layer. Our neural network has parameters (W,b) = (W(1),b(1),W(2),b(2)), where we write to denote the parameter (or weight) associated with the connection between unit j in layer , and unit i in layer + 1. (Note the order of the indices.) Also, is the bias associated with unit i in layer + 1. Thus, in our example, we have , and . Note that bias units don't have inputs or connections going into them, since they always output the value +1. We also let sl denote the number of nodes in layer  (not counting the bias unit).  
【原文】We will let nl denote the number of layers in our network; thus nl = 3 in our example. We label layer as Ll, so layer L1 is the input layer, and layer the output layer. Our neural network has parameters (W,b) = (W(1),b(1),W(2),b(2)), where we write to denote the parameter (or weight) associated with the connection between unit j in layer , and unit i in layer + 1. (Note the order of the indices.) Also, is the bias associated with unit i in layer + 1. Thus, in our example, we have , and . Note that bias units don't have inputs or connections going into them, since they always output the value +1. We also let sl denote the number of nodes in layer  (not counting the bias unit).  
 +
【初译】标记为网络的层数;这样。标记层1为,这样层为输入层,层为输出层。神经网络参数,参数(或权重)表示层l节点j和层l+ 1节点i之间连接关系(注意角标的顺序。)表示层l+ 1节点i与偏置节点之间的连接关系。这样,在我们的例子中,和。注意到偏置节点没有输入和连接,所以输出总是为值+1。我们标记为层l的节点数目(不包含偏置节点数)。
【初译】标记为网络的层数;这样。标记层1为,这样层为输入层,层为输出层。神经网络参数,参数(或权重)表示层l节点j和层l+ 1节点i之间连接关系(注意角标的顺序。)表示层l+ 1节点i与偏置节点之间的连接关系。这样,在我们的例子中,和。注意到偏置节点没有输入和连接,所以输出总是为值+1。我们标记为层l的节点数目(不包含偏置节点数)。
 +
【一审】我们用nl表示网络的层数,因此,本例中nl=3,将第 层记为Ll,于是Ll就是输入层,输出层记为。本例神经网络有参数(W,b) = (W(1),b(1),W(2),b(2)),这里第 层第j单元与第 +1层第i单元之间联接的参数就用来表示(注意标号顺序)。同样,是第 + 1层第i单元的偏置项。(二审注:这里有点问题)因此,本例中,,。注意,偏置单元并没有输入值或与其它单元反向相联,这是因为它们总是只有一个输出值+1。同时,我们用sl表示第 层的节点数(偏置单元不计在内)。
【一审】我们用nl表示网络的层数,因此,本例中nl=3,将第 层记为Ll,于是Ll就是输入层,输出层记为。本例神经网络有参数(W,b) = (W(1),b(1),W(2),b(2)),这里第 层第j单元与第 +1层第i单元之间联接的参数就用来表示(注意标号顺序)。同样,是第 + 1层第i单元的偏置项。(二审注:这里有点问题)因此,本例中,,。注意,偏置单元并没有输入值或与其它单元反向相联,这是因为它们总是只有一个输出值+1。同时,我们用sl表示第 层的节点数(偏置单元不计在内)。
 +
【二审】我们用nl表示网络的层数,因此,本例中nl=3,将第 层记为L,于是Ll就是输入层,输出层记为。本例神经网络的参数(W,b) = (W(1),b(1),W(2),b(2)),其中第 层第j号单元与第 +1层第i号单元之间联接的参数(注意标号顺序),是第层的偏置项与 + 1层的第i号单元之间的参数。因此,本例中,,。注意,没有其他单元员连向偏置单元(也就是偏置单元没有输入),因为它们总是输出+1。同时,我们用sl表示第 层的节点数(偏置单元不计在内)。
【二审】我们用nl表示网络的层数,因此,本例中nl=3,将第 层记为L,于是Ll就是输入层,输出层记为。本例神经网络的参数(W,b) = (W(1),b(1),W(2),b(2)),其中第 层第j号单元与第 +1层第i号单元之间联接的参数(注意标号顺序),是第层的偏置项与 + 1层的第i号单元之间的参数。因此,本例中,,。注意,没有其他单元员连向偏置单元(也就是偏置单元没有输入),因为它们总是输出+1。同时,我们用sl表示第 层的节点数(偏置单元不计在内)。
【原文】We will write to denote the activation (meaning output value) of unit i in layer . For = 1, we also use to denote the i-th input. Given a fixed setting of the parameters W,b, our neural network defines a hypothesis hW,b(x) that outputs a real number. Specifically, the computation that this neural network represents is given by:  
【原文】We will write to denote the activation (meaning output value) of unit i in layer . For = 1, we also use to denote the i-th input. Given a fixed setting of the parameters W,b, our neural network defines a hypothesis hW,b(x) that outputs a real number. Specifically, the computation that this neural network represents is given by:  
 +
【初译】用表示层l节点i激活(意味着有输出值)。对于l= 1时,我们用表示第i 个输入节点的输出值。给定参数W,b,神经网络就定义了一个假设函数hW,b(x),其输出为真实值。下面明确的给出这个神经网络的计算公式:
【初译】用表示层l节点i激活(意味着有输出值)。对于l= 1时,我们用表示第i 个输入节点的输出值。给定参数W,b,神经网络就定义了一个假设函数hW,b(x),其输出为真实值。下面明确的给出这个神经网络的计算公式:
 +
【一审】我们用表示第  层第i单元的激活值(输出值)。当  = 1时,同时也表示第i个单元的输入。对于给定参数集合W,b,我们的神经网络就以函数hW,b(x)计算输出结果。本例神经网络的计算过程就由以下步骤表示:
【一审】我们用表示第  层第i单元的激活值(输出值)。当  = 1时,同时也表示第i个单元的输入。对于给定参数集合W,b,我们的神经网络就以函数hW,b(x)计算输出结果。本例神经网络的计算过程就由以下步骤表示:
 +
【二审】我们用表示第  层第i号单元的激活值(输出值)。当  = 1时,,也就是第i个特征的输入值。对于给定参数集合W,b,我们的神经网络就按照函数hW,b(x)计算输出结果。本例神经网络的计算过程就由以下步骤表示:
【二审】我们用表示第  层第i号单元的激活值(输出值)。当  = 1时,,也就是第i个特征的输入值。对于给定参数集合W,b,我们的神经网络就按照函数hW,b(x)计算输出结果。本例神经网络的计算过程就由以下步骤表示:
 +
【原文】In the sequel, we also let denote the total weighted sum of inputs to unit i in layer , including the bias term (e.g., ), so that.
-
【原文】In the sequel, we also let denote the total weighted sum of inputs to unit i in layer , including the bias term (e.g., ), so that .
 
【初译】下面,我们用表示层l节点i的加权后输入量与偏置项之和(例如,),这样。
【初译】下面,我们用表示层l节点i的加权后输入量与偏置项之和(例如,),这样。
 +
【一审】我们用表示第  层第i单元输入的加权总和(包括偏置单元),比如,,则。
【一审】我们用表示第  层第i单元输入的加权总和(包括偏置单元),比如,,则。
 +
【二审】我们用表示第  层第i单元输入值的加权总和(包括偏置单元),比如,,则。
【二审】我们用表示第  层第i单元输入值的加权总和(包括偏置单元),比如,,则。
-
Note that this easily lends itself to a more compact notation. Specifically, if we extend the activation function to apply to vectors in an element-wise fashion (i.e., f([z1,z2,z3]) = [f(z1),f(z2),f(z3)]), then we can write the equations above more compactly as:  
+
 
 +
【原文】Note that this easily lends itself to a more compact notation. Specifically, if we extend the activation function to apply to vectors in an element-wise fashion (i.e., f([z1,z2,z3]) = [f(z1),f(z2),f(z3)]), then we can write the equations above more compactly as:  
 +
 
【初译】这样可以推导出一个更简洁的表示法。特别地,如果我们扩展激活函数为向量形式(例如,f([z1,z2,z3]) = [f(z1),f(z2),f(z3)]),这样我们可以使等式更为简洁:
【初译】这样可以推导出一个更简洁的表示法。特别地,如果我们扩展激活函数为向量形式(例如,f([z1,z2,z3]) = [f(z1),f(z2),f(z3)]),这样我们可以使等式更为简洁:
Line 110: Line 122:
【二审】这样我们就可以找到一种更简洁的表示法。这里我们将激活函数扩展为用向量(分量的形式)来表示,即是f([z1,z2,z3]) = [f(z1),f(z2),f(z3)],那么,上面的等式我们就可以表示为:
【二审】这样我们就可以找到一种更简洁的表示法。这里我们将激活函数扩展为用向量(分量的形式)来表示,即是f([z1,z2,z3]) = [f(z1),f(z2),f(z3)],那么,上面的等式我们就可以表示为:
 +
【原文】We call this step forward propagation. More generally, recalling that we also use a(1) = x to also denote the values from the input layer, then given  layer  's activations a(l), we can compute layer + 1's activations a(l + 1) as:
-
  【原文】We call this step forward propagation. More generally, recalling that we also use a(1) = x to also denote the values from the input layer, then given  layer  's activations a(l), we can compute layer + 1's activations a(l + 1) as:
 
【初译】我们称这个步骤为正向传播。更一般化,回想我们用到a(1) = x来表示输入层的输出值,给定层l激活(输出)值a(l),我们可以计算层l+1激活(输出)值a(l + 1)
【初译】我们称这个步骤为正向传播。更一般化,回想我们用到a(1) = x来表示输入层的输出值,给定层l激活(输出)值a(l),我们可以计算层l+1激活(输出)值a(l + 1)
Line 119: Line 131:
【原文】By organizing our parameters in matrices and using matrix-vector operations, we can take advantage of fast linear algebra routines to quickly perform calculations in our network.  
【原文】By organizing our parameters in matrices and using matrix-vector operations, we can take advantage of fast linear algebra routines to quickly perform calculations in our network.  
-
【初译】把参数矩阵化和使用矩阵-向量操作,我们可以利用线性代数性质来快速计算
+
 
 +
【初译】把参数矩阵化和使用矩阵-向量操作,我们可以利用线性代数性质来快速计算。
 +
 
【一审】将参数矩阵化,使用矩阵-向量运算,我们就可以利用线性代数的优势对神经网络进行快速地求解。
【一审】将参数矩阵化,使用矩阵-向量运算,我们就可以利用线性代数的优势对神经网络进行快速地求解。
 +
【二审】将参数矩阵化,使用矩阵-向量运算,我们就可以利用线性代数的优势对神经网络进行快速地求解。
【二审】将参数矩阵化,使用矩阵-向量运算,我们就可以利用线性代数的优势对神经网络进行快速地求解。
 +
【原文】We have so far focused on one example neural network, but one can also build neural networks with other architectures (meaning patterns of connectivity between neurons), including ones with multiple hidden layers. The most common choice is a -layered network where layer is the input layer, layer is the output layer, and each layer is densely connected to layer . In this setting, to compute the output of the network, we can successively compute all the activations in layer , then layer , and so on, up to layer , using the equations above that describe the forward propagation step. This is one example of a feedforward neural network, since the connectivity graph does not have any directed loops or cycles.  
【原文】We have so far focused on one example neural network, but one can also build neural networks with other architectures (meaning patterns of connectivity between neurons), including ones with multiple hidden layers. The most common choice is a -layered network where layer is the input layer, layer is the output layer, and each layer is densely connected to layer . In this setting, to compute the output of the network, we can successively compute all the activations in layer , then layer , and so on, up to layer , using the equations above that describe the forward propagation step. This is one example of a feedforward neural network, since the connectivity graph does not have any directed loops or cycles.  
 +
【初译】目前为止我们着重描述了一个神经网络的例子,但是你也可以设计其他结构的神经网络(神经元之间连接模式不同),也可以设计包含多个隐层的神经网络。最常见的是层网络,l为输入层,层为输出层,每个层l密集的连接到层l+1.在这种设计中,为了计算网络的输出,我们可以逐步计算每层的激活值,层,层,最后为层。利用上面我们提及的正向传播步骤。这是一个前馈神经网络例子,因为神经元之间彼此连接不构成任何直接闭环或回路。
【初译】目前为止我们着重描述了一个神经网络的例子,但是你也可以设计其他结构的神经网络(神经元之间连接模式不同),也可以设计包含多个隐层的神经网络。最常见的是层网络,l为输入层,层为输出层,每个层l密集的连接到层l+1.在这种设计中,为了计算网络的输出,我们可以逐步计算每层的激活值,层,层,最后为层。利用上面我们提及的正向传播步骤。这是一个前馈神经网络例子,因为神经元之间彼此连接不构成任何直接闭环或回路。
 +
【一审】目前为止,我们讨论了一种神经网络的例子,但我们也可以构建一个另一种“结构”(这里结构指的是神经元之间的联接模式)的神经网络,包括具有多个隐藏层的神经网络。最常见的一种例子是层的神经网络,第1层是输入层,第层是输出层,中间的每个  层与层紧密相联。这种模式下,要计算神经网络的输出结果,我们可以通过之前的等式描述的那样,按部就班,进行前向传导,逐一计算第层的所有激活值,再者是第层的激活值,以此类推,直到第层。这是一个“前向传导”神经网络的样例,因为这种联接图并没有闭环或回路。
【一审】目前为止,我们讨论了一种神经网络的例子,但我们也可以构建一个另一种“结构”(这里结构指的是神经元之间的联接模式)的神经网络,包括具有多个隐藏层的神经网络。最常见的一种例子是层的神经网络,第1层是输入层,第层是输出层,中间的每个  层与层紧密相联。这种模式下,要计算神经网络的输出结果,我们可以通过之前的等式描述的那样,按部就班,进行前向传导,逐一计算第层的所有激活值,再者是第层的激活值,以此类推,直到第层。这是一个“前向传导”神经网络的样例,因为这种联接图并没有闭环或回路。
 +
【二审】目前为止,我们讨论了一种神经网络的例子,但我们也可以构建一个另一种“结构”的神经网络(这里结构指的是神经元之间的联接模式),包括具有多个隐藏层的神经网络。最常见的一个例子是层的神经网络,第1层是输入层,第层是输出层,中间的每个  层与层紧密相联。这种模式下,要计算神经网络的输出结果,我们可以通过之前的等式描述的那样,按部就班,进行正向传播,逐一计算第层的所有激活值,再者是第层的激活值,以此类推,直到第层。这是一个“前馈”神经网络的样例,因为这种联接图并没有闭环或回路。
【二审】目前为止,我们讨论了一种神经网络的例子,但我们也可以构建一个另一种“结构”的神经网络(这里结构指的是神经元之间的联接模式),包括具有多个隐藏层的神经网络。最常见的一个例子是层的神经网络,第1层是输入层,第层是输出层,中间的每个  层与层紧密相联。这种模式下,要计算神经网络的输出结果,我们可以通过之前的等式描述的那样,按部就班,进行正向传播,逐一计算第层的所有激活值,再者是第层的激活值,以此类推,直到第层。这是一个“前馈”神经网络的样例,因为这种联接图并没有闭环或回路。
-
【原文】Neural networks can also have multiple output units. For example, here is a network with two hidden layers layers L2 and L3 and two output units in layer L4:  
+
【原文】Neural networks can also have multiple output units. For example, here is a network with two hidden layers layers L2 and L3 and two output units in layer L4:
 +
【初译】神经网络也可以有多个输出节点。例如,这是一个神经网络有两个隐层L2 L3 ,层L4有两个输出节点。
【初译】神经网络也可以有多个输出节点。例如,这是一个神经网络有两个隐层L2 L3 ,层L4有两个输出节点。
 +
【一审】神经网络也可以有多个输出单元。比如,以下神经网络有两层隐藏层:L2 及L3,并在L4层中有两个输出单元。
【一审】神经网络也可以有多个输出单元。比如,以下神经网络有两层隐藏层:L2 及L3,并在L4层中有两个输出单元。
 +
【二审】神经网络也可以有多个输出单元。比如,以下神经网络有两层隐藏层:L2 及L3,并在L4层中有两个输出单元。
【二审】神经网络也可以有多个输出单元。比如,以下神经网络有两层隐藏层:L2 及L3,并在L4层中有两个输出单元。
【原文】To train this network, we would need training examples (x(i),y(i)) where . This sort of network is useful if there're multiple outputs that you're interested in predicting. (For example, in a medical diagnosis application, the vector x might give the input features of a patient, and the different outputs yi's might indicate presence or absence of different diseases.)  
【原文】To train this network, we would need training examples (x(i),y(i)) where . This sort of network is useful if there're multiple outputs that you're interested in predicting. (For example, in a medical diagnosis application, the vector x might give the input features of a patient, and the different outputs yi's might indicate presence or absence of different diseases.)  
 +
【初译】为了训练网络,我们需要训练样本(x(i),y(i)),其中。当你想用于预测时,多个输出的网络更为有用。(例如,在医学诊断应用中,向量x表示病人情况,不同输出yi表示不同疾病的存在或者不存在。)
【初译】为了训练网络,我们需要训练样本(x(i),y(i)),其中。当你想用于预测时,多个输出的网络更为有用。(例如,在医学诊断应用中,向量x表示病人情况,不同输出yi表示不同疾病的存在或者不存在。)
 +
【一审】要求解这样的神经网络,我们就需要样本集(x(i),y(i)),其中。如果你想预测的输出是多个的,那这种神经网络是很适用的。(比如,在医疗诊断应用中,患者的体征指标就可以作为向量的输入值,而不同的输出值yi就可以表示不同的疾病存在与否。)
【一审】要求解这样的神经网络,我们就需要样本集(x(i),y(i)),其中。如果你想预测的输出是多个的,那这种神经网络是很适用的。(比如,在医疗诊断应用中,患者的体征指标就可以作为向量的输入值,而不同的输出值yi就可以表示不同的疾病存在与否。)
 +
【二审】要求解这样的神经网络,我们就需要样本集(x(i),y(i)),其中。如果你想预测的输出是多个的,那这种神经网络是很适用的。(比如,在医疗诊断应用中,患者的体征指标就可以作为向量的输入值,而不同的输出值yi就可以表示不同的疾病存在与否。)
【二审】要求解这样的神经网络,我们就需要样本集(x(i),y(i)),其中。如果你想预测的输出是多个的,那这种神经网络是很适用的。(比如,在医疗诊断应用中,患者的体征指标就可以作为向量的输入值,而不同的输出值yi就可以表示不同的疾病存在与否。)

Revision as of 11:59, 8 March 2013

Personal tools