微调多层自编码算法
From Ufldl
Line 1: | Line 1: | ||
- | + | ==介绍== | |
+ | 微调是深度学习中的常用策略,可以大幅提升一个栈式自编码神经网络的性能表现。从更高的视角来讲,微调将栈式自编码神经网络的所有层视为一个模型,这样在每次迭代中,网络的所有权重值都可以被优化。 | ||
- | + | ==一般策略== | |
- | + | 幸运的是,实施微调栈式自编码神经网络所需的工具都已齐备!为了在每次迭代中计算所有层的梯度,我们需要使用稀疏自动编码一节讨论的[[反向传播算法]]。因为反向传播算法可以延伸应用到任意多层,所以,事实上该算法对任意多层的栈式自编码神经网络都适用。 | |
+ | |||
+ | ==使用反向传播法微调== | ||
+ | |||
+ | 为方便读者,以下我们简要描述如何实施反向传播算法: | ||
+ | |||
+ | |||
+ | : 1. 进行一次前馈传递,对 <math>\textstyle L_2</math> 层、<math>\textstyle L_3</math> 层直到输出层 <math>\textstyle L_{n_l}</math>,使用前向传播步骤中定义的公式计算各层上的激活值(激励响应)。 | ||
+ | |||
+ | |||
+ | : 2. 对输出层(<math>\textstyle n_l</math> 层),令 | ||
+ | ::<math>\begin{align} | ||
+ | \delta^{(n_l)} | ||
+ | = - (\nabla_{a^{n_l}}J) \bullet f'(z^{(n_l)}) | ||
+ | \end{align}</math> | ||
+ | ::(当使用softmax分类器时,softmax层满足:<math>\nabla J = \theta^T(I-P)</math>,其中 <math>\textstyle I</math> 为输入数据对应的类别标签,<math>\textstyle P</math> 为条件概率向量。) | ||
+ | |||
+ | |||
+ | : 3. 对 <math>\textstyle l = n_l-1, n_l-2, n_l-3, \ldots, 2</math> | ||
+ | ::令 | ||
+ | :::<math>\begin{align} | ||
+ | \delta^{(l)} = \left((W^{(l)})^T \delta^{(l+1)}\right) \bullet f'(z^{(l)}) | ||
+ | \end{align}</math> | ||
+ | |||
+ | |||
+ | : 4. 计算所需的偏导数: | ||
+ | ::<math>\begin{align} | ||
+ | \nabla_{W^{(l)}} J(W,b;x,y) &= \delta^{(l+1)} (a^{(l)})^T, \\ | ||
+ | \nabla_{b^{(l)}} J(W,b;x,y) &= \delta^{(l+1)}. | ||
+ | \end{align}</math> | ||
+ | |||
+ | :<math>\begin{align} | ||
+ | J(W,b) | ||
+ | &= \left[ \frac{1}{m} \sum_{i=1}^m J(W,b;x^{(i)},y^{(i)}) \right] | ||
+ | \end{align}</math> | ||
+ | |||
+ | |||
+ | {{Quote| | ||
+ | 注:我们可以认为输出层softmax分类器是附加上的一层,但是其推导需要分别处理。具体地说,网络“最后一层”的特征会进入softmax分类器。所以,第二步中的导数由 <math>\delta^{(n_l)} = - (\nabla_{a^{n_l}}J) \bullet f'(z^{(n_l)})</math> 计算,其中 <math>\nabla J = \theta^T(I-P)</math>。 | ||
+ | }} | ||
+ | |||
+ | |||
+ | ==中英文对照== | ||
+ | stacked autoencoder 栈式自编码神经网络(可以考虑翻译为“多层自动编码机”或“多层自动编码神经网络”) | ||
+ | |||
+ | fine tuning 微调 | ||
+ | |||
+ | Backpropagation Algorithm 反向传播算法 | ||
+ | |||
+ | feedforward pass 前馈传递 | ||
+ | |||
+ | activation 激活值 (可以考虑翻译为“激励响应”或“响应”) | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==中文译者== | ||
+ | 初译:@太二真人 一审:@余凯_西二旗民工 终审:@JerryLead | ||
- | |||
=== Introduction === | === Introduction === |