稀疏自编码重述

From Ufldl

Jump to: navigation, search
(Sparse Autoencoder Recap)
Line 1: Line 1:
翻译者:严晓东,yan.endless@gmail.com,新浪微博:@月蝕-eclipse
翻译者:严晓东,yan.endless@gmail.com,新浪微博:@月蝕-eclipse
校对者:姚涛,email: yaothinker@gmail.com, 新浪微博:@小狗笑了
校对者:姚涛,email: yaothinker@gmail.com, 新浪微博:@小狗笑了
-
Wiki上传者:严晓东,email:yan.endless,新浪微博:@GuitarFang;姚涛,email: yaothinker@gmail.com, 新浪微博:@小狗笑了
+
Wiki上传者:严晓东;姚涛
== Sparse Autoencoder Recap ==
== Sparse Autoencoder Recap ==
Line 86: Line 86:
== Linear Decoder ==
== Linear Decoder ==
-
:【原文】:
+
:【原文】:
One easy fix for this problem is to set <math>a^{(3)} = z^{(3)}</math>.  Formally, this is achieved by having the output
One easy fix for this problem is to set <math>a^{(3)} = z^{(3)}</math>.  Formally, this is achieved by having the output
Line 96: Line 96:
It is only in the ''output'' layer that we use the linear activation function.   
It is only in the ''output'' layer that we use the linear activation function.   
-
:【初译】:
+
:【初译】:
一个简单的解决方案是设定:<math>a^{(3)} = z^{(3)}</math>.型式上看,令输出端口使用一个激励机制,让其符合 <math>f(z) = z</math>,所以有<math>a^{(3)} = f(z^{(3)}) = z^{(3)}</math>. 这个特定的激励机制函数 被称为 '''线性激励函数 '''(这个“一致激励函数”也可以有一个更好的名字). 注意不管隐含层状态如何,我们都使用一个S型(或者是tanh)的激励函数,这样隐藏单元激励表达式为(表明) <math>\textstyle a^{(2)} = \sigma(W^{(1)}x + b^{(1)})</math> ,这里<math>\sigma(\cdot)</math> 是S型函数, <math>x</math> 是输入, <math>W^{(1)}</math> 和<math>b^{(1)}</math> 分别是隐单元的权重和偏项,我们仅在输出层中使用线性激励机制。
一个简单的解决方案是设定:<math>a^{(3)} = z^{(3)}</math>.型式上看,令输出端口使用一个激励机制,让其符合 <math>f(z) = z</math>,所以有<math>a^{(3)} = f(z^{(3)}) = z^{(3)}</math>. 这个特定的激励机制函数 被称为 '''线性激励函数 '''(这个“一致激励函数”也可以有一个更好的名字). 注意不管隐含层状态如何,我们都使用一个S型(或者是tanh)的激励函数,这样隐藏单元激励表达式为(表明) <math>\textstyle a^{(2)} = \sigma(W^{(1)}x + b^{(1)})</math> ,这里<math>\sigma(\cdot)</math> 是S型函数, <math>x</math> 是输入, <math>W^{(1)}</math> 和<math>b^{(1)}</math> 分别是隐单元的权重和偏项,我们仅在输出层中使用线性激励机制。
-
:【一校】:
+
:【一校】:
设定<math>a^{(3)} = z^{(3)}</math>可以很简单的解决上述问题。从形式上来看,就是输出端使用恒等函数<math>f(z) = z</math>作为激励函数,于是有<math>a^{(3)} = f(z^{(3)}) = z^{(3)}</math>。我们称该特殊的激励函数为 '''线性激励函数 '''(称为恒等激励函数可能更好些)。
设定<math>a^{(3)} = z^{(3)}</math>可以很简单的解决上述问题。从形式上来看,就是输出端使用恒等函数<math>f(z) = z</math>作为激励函数,于是有<math>a^{(3)} = f(z^{(3)}) = z^{(3)}</math>。我们称该特殊的激励函数为 '''线性激励函数 '''(称为恒等激励函数可能更好些)。
需要注意,神经网络中隐含层的神经元依然使用S型(或者tanh)激励函数。这样隐含单元的激励公式为 <math>\textstyle a^{(2)} = \sigma(W^{(1)}x + b^{(1)})</math> ,其中<math>\sigma(\cdot)</math> 是S型函数, <math>x</math> 是输入, <math>W^{(1)}</math> 和<math>b^{(1)}</math> 分别是隐单元的权重和偏差项。我们仅在输出层中使用线性激励函数。
需要注意,神经网络中隐含层的神经元依然使用S型(或者tanh)激励函数。这样隐含单元的激励公式为 <math>\textstyle a^{(2)} = \sigma(W^{(1)}x + b^{(1)})</math> ,其中<math>\sigma(\cdot)</math> 是S型函数, <math>x</math> 是输入, <math>W^{(1)}</math> 和<math>b^{(1)}</math> 分别是隐单元的权重和偏差项。我们仅在输出层中使用线性激励函数。
-
:【原文】:
+
:【原文】:
An autoencoder in this configuration--with a sigmoid (or tanh) hidden layer and a linear output layer--is called a '''linear decoder'''.  
An autoencoder in this configuration--with a sigmoid (or tanh) hidden layer and a linear output layer--is called a '''linear decoder'''.  
In this model, we have <math>\hat{x} = a^{(3)} = z^{(3)} = W^{(2)}a + b^{(2)}</math>. Because the output <math>\hat{x} </math> is a now linear function of the hidden unit activations, by varying <math>W^{(2)}</math>, each output unit <math>a^{(3)}</math> can be made to produce values greater than 1 or less than 0 as well.  This allows us to train the sparse autoencoder real-valued inputs without needing to pre-scale every example to a specific range.   
In this model, we have <math>\hat{x} = a^{(3)} = z^{(3)} = W^{(2)}a + b^{(2)}</math>. Because the output <math>\hat{x} </math> is a now linear function of the hidden unit activations, by varying <math>W^{(2)}</math>, each output unit <math>a^{(3)}</math> can be made to produce values greater than 1 or less than 0 as well.  This allows us to train the sparse autoencoder real-valued inputs without needing to pre-scale every example to a specific range.   
-
:【初译】:
+
:【初译】:
一个自编码器在这个设置中,有一个S型(或tanh)隐含层和一个线性输出层—被称为'''线性解码'''。在这个模型中,我们有 <math>\hat{x} = a^{(3)} = z^{(3)} = W^{(2)}a + b^{(2)}</math>。因为输出<math>\hat{x} </math>是一个包含隐单元的线性函数,通过改变<math>W^{(2)}</math> 的值,每一个输出单元<math>a^{(3)}</math> 可以用来构造产生大于1或者小于0的值。这让我们可以采用构造稀疏自编码实现实值输入而不需以特定范围来预限定每一个输入样。
一个自编码器在这个设置中,有一个S型(或tanh)隐含层和一个线性输出层—被称为'''线性解码'''。在这个模型中,我们有 <math>\hat{x} = a^{(3)} = z^{(3)} = W^{(2)}a + b^{(2)}</math>。因为输出<math>\hat{x} </math>是一个包含隐单元的线性函数,通过改变<math>W^{(2)}</math> 的值,每一个输出单元<math>a^{(3)}</math> 可以用来构造产生大于1或者小于0的值。这让我们可以采用构造稀疏自编码实现实值输入而不需以特定范围来预限定每一个输入样。
-
:【一校】:
+
:【一校】:
一个S型或tanh隐含层以及线性输出层构成的自编码器,我们称为'''线性解码器'''。
一个S型或tanh隐含层以及线性输出层构成的自编码器,我们称为'''线性解码器'''。
在这个线性解码器模型中,<math>\hat{x} = a^{(3)} = z^{(3)} = W^{(2)}a + b^{(2)}</math>。因为输出<math>\hat{x} </math>是隐单元激励输出的线性函数,改变<math>W^{(2)}</math> ,可以使输出值<math>a^{(3)}</math> 大于1或者小于0。这使得我们可以用实值输入来训练稀疏自编码器,避免预先缩放样本到给定范围。
在这个线性解码器模型中,<math>\hat{x} = a^{(3)} = z^{(3)} = W^{(2)}a + b^{(2)}</math>。因为输出<math>\hat{x} </math>是隐单元激励输出的线性函数,改变<math>W^{(2)}</math> ,可以使输出值<math>a^{(3)}</math> 大于1或者小于0。这使得我们可以用实值输入来训练稀疏自编码器,避免预先缩放样本到给定范围。
-
:【原文】:
+
:【原文】:
Since we have changed the activation function of the output units, the gradients of the output units also change. Recall that for each output unit, we had set set the error terms as follows:
Since we have changed the activation function of the output units, the gradients of the output units also change. Recall that for each output unit, we had set set the error terms as follows:
Line 140: Line 140:
-
:【初译】:
+
:【初译】:
改变了输出单元的激励机制,这个输出单元梯度也随之改变了。回顾之前每一个输出单元,我们设定误差项如下:
改变了输出单元的激励机制,这个输出单元梯度也随之改变了。回顾之前每一个输出单元,我们设定误差项如下:
Line 159: Line 159:
-
:【一校】:
+
:【一校】:
随着输出单元的激励函数的改变,这个输出单元梯度也相应变化。回顾之前每一个输出单元误差项定义为:
随着输出单元的激励函数的改变,这个输出单元梯度也相应变化。回顾之前每一个输出单元误差项定义为:
Line 180: Line 180:
-
:【原文】:
+
:【原文】:
Line 192: Line 192:
derivative of the sigmoid (or tanh) function.
derivative of the sigmoid (or tanh) function.
-
:【初译】:
+
:【初译】:
当然,若使用反向传播算法来计算隐含层的误差项时:
当然,若使用反向传播算法来计算隐含层的误差项时:
Line 205: Line 205:
-
:【一校】:
+
:【一校】:

Revision as of 06:20, 8 March 2013

Personal tools