




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、深度神经网络 IIDeep Neural Networks中国科学院自动化研究所吴高巍2015-10-27内容 深度学习常用模型 Deep Boltzmann Machines, DBM Convolutional Neural Network, CNN Recurrent Neural Networks, RNN 深度学习的使用 Deep Learning的常用模型 Deep Boltzmann Machines, DBM回顾:Deep Belief Network, DBN 概率生成模型 深层结构多层 二值随机神经元 非监督的预学习 监督微调(fine-tuning)DBN Greedy
2、training RBM 学习目标:极大似然 能量函数 E(v,h) = vTWh bTv aTh 波尔兹曼分布Niivp1)(log(maxRBM CD-K算法RBM CD-1算法AutoEncoder vs. RBMDeep Boltzmann Machines所有层间无向连接同层神经元间无连接高层表示由无标注数据建立标注数据仅用来微调网络Salakhutdinov & Hinton, 2009DBM vs DBN 多层模型中,层间的无向连接构成完全的Boltzmann机Deep Boltzmann MachineDeep Belief NetworkDBM 训练 训练时采用双方向
3、(上下两层) 在训练单层时需同时考虑两个或者多个隐含层 能量模型与RBM不一样两层DBMDBMPre-training:Can (must) initialize from stacked RBMsGenerative fine-tuning:Positive phase: variational approximation (mean-field)Negative phase: persistent chain (stochastic approxiamtion)Discriminative fine-tuning:backpropagationDeep Boltzmann Machine例
4、:两层BM MNIST: 2-layer BM60,000 training and 10,000 testing examples 0.9 million parameters Gibbs sampler for 100,000 stepsAfter discriminative fine-tuning: 0.95% error rate Compare with DBN 1.2%, SVM 1.4%例:NORB dataset NORB dataset例:NORB datasetR. SalskhutdinovWhy Greedy Layer Wise Training Works Reg
5、ularization Hypothesis Pre-training is “constraining” parameters in a region relevant to unsupervised dataset Better generalization Representations that better describe unlabeled data are more discriminative for labeled data Optimization Hypothesis Unsupervised training initializes lower level param
6、eters near localities of better minima than random initialization can Deep Learning的常用模型 Convolutional Neural Networks, CNNConvolutional Neural Networks卷积神经网络20世纪60年代,Hubel和Wiesel研究猫脑皮层用于局部敏感和方向选择的神经元,其独特的网络结构可以有效地降低反馈神经网络的复杂性卷积神经网络是一种特殊的深层神经网络模型它的神经元间的连接是非全连接的同一层中某些神经元之间的连接的权重是共享的(即相同的)。Hubel-Wiese
7、l结构 基于猫的初级视皮层(VI区)的研究。 简单细胞 复杂细胞 两层神经网络模拟初级视皮层中的简单细胞和复杂细胞 每层的神经元被组织成二维平面 “简单细胞”层提取其输入中的局部特征 “复杂细胞”层组合“简单细胞”层中相应的子区域,使得整个网络对局部变换具有一定的不变性。局部连接 局部感知野 图像的空间联系也是局部的像素联系较为紧密,而距离较远的像素相关性则较弱。 减少了需要训练的权值数目局部连接 参数共享 图像的一部分的统计特性与其他部分是一样的。 在输入的不同位置检测同一种特征 平移不变性Convolution卷积 一维卷积 二维卷积jjTjc: 1|mxmx:c:卷积 稀疏连接 参数共享
8、多卷积核 每个卷积核都会将图像生成为另一幅图像。 两个卷积核就可以将生成两幅图像,这两幅图像可以看做是一张图像的不同的通道。由4个通道卷积得到2个通道的过程Pooling池化通过卷积获得了特征 之后,下一步利用这些特征去做分类。使用卷积时是利用了图像的“静态”特征Pooling, 对不同位置的特征进行聚合统计子采样Average poolMax poolL2 poolConvolved FeaturePooled Featureixs21maxix221ixsCNN基本结构 卷积层 子采样层CNN结构Input LayerC1: 4 feature mapsS1: 4 feature maps
9、C2: 6 feature mapsS2: 6 feature maps 卷积神经网络是一个多层的神经网络 每层由多个二维平面组成 每个平面由多个独立神经元组成CNN训练过程 监督训练 Bp算法 向前传播从样本集中取一个样本(X,Yp),将X输入网络计算相应的实际输出OpOp=Fn( F2( F1( XpW(1) )W(2) )W(n) ) 向后传播计算实际输出Op与相应的理想输出Yp的差按极小化误差的方法反向传播调整权矩阵CNN反向传播 代价函数 最小化平方误差(MSE),最小化相对熵(Relative Entropy) 反向传播主要考虑三个方面: 输出层,代价函数的确定及求导 Poolin
10、g,数据的下采样及残差的上采样 卷积层,数据的卷积运算及残差的反卷积运算例:文字识别系统LeNet-5 当年美国大多数银行就是用它来识别支票上面的手写数字的。文字识别系统LeNet-5 卷积网络的核心思想: 将局部感受野、权值共享以及时间或空间亚采样这三种结构思想结合起来获得了某种程度的位移、尺度、形变不变性。 层间联系和空域信息的紧密关系,使其适于图像处理和理解。 图像和网络的拓扑结构能很好的吻合 避免了显式的特征抽取,而隐式地从训练数据中进行学习 特征提取和模式分类同时进行,并同时在训练中产生; 权重共享可以减少网络的训练参数,使神经网络结构变得更简单,适应性更强。ImageNet CNN
11、 Structure (conv-relu-maxpool-norm) Very good implementation, running on two GPUs ReLU transfer function. Dropout trick. Also trains on full ImageNet (15M images, 15000 classes)(Kirzhevsky, Sutskever, Hinton, 2012)ImageNet CNNCNN的改进 Rectified linear function 加速收敛 稀疏化 dropout 将隐层节点以一定概率清0 可以将dropout看
12、作是模型平均的一种CNN的改进 local Contrast Normalization Subtracting a low-pass smoothed version of the layer Just another convolution in fact (with fixed coefficients) Lots of variants (per feature map, across feature maps, ) Empirically, seems to help a bit (1-2%) on ImageNetCNN改进 非线性变换、池化(Jarret et al., 2009
13、)CNNs in the 2010s Deep Learning的常用模型 Recurrent Neural Networks, RNN Long Short Term Memory, LSTM序列数据建模(modeling sequences) 学习序列数据,常需要转换输入序列到不同领域的输出序列 eg. turn a sequence of sound pressures into a sequence of word identities. 如果没有分离的目标序列,可以通过预测输入序列中的下一项来得到“教师信号”。 The target output sequence is the in
14、put sequence with an advance of 1 step. For temporal sequences there is a natural order for the predictions. 预测序列的下一项,模糊了监督学习与非监督学习的差别 It uses methods designed for supervised learning, but it doesnt require a separate teaching signal.Recurrent Neural Networks, RNN Hidden Layer会有连向下一时间Hidden Layer的边
15、RNN功能强大 Distributed hidden state that allows them to store a lot of information about the past efficiently. Non-linear dynamics that allows them to update their hidden state in complicated ways.RNN 一般来说,RNN每一时间的输入和输出是不一样的 例,序列学习 对于序列数据是将序列项依次传入,每个序列项再对应不同的输出RNN 时序展开 在RNN中每一个时间步骤用到的参数都是一样的unfoldTrain
16、ing RNNs with backpropagation 权值一致的BP算法 BP算法容易实现权值间的线性约束 同样计算梯度,然后改变梯度以满足约束 如果权值开始时满足约束,那就会一直满足约束2121212121:wandwforwEwEusewEandwEcomputewwneedwewwconstrainToBPTT, Back Propagation Through Time RNN可看作权值共享的多层、前向网络 训练权值约束的前向网络 时间域上的训练算法 The forward pass builds up a stack of the activities of all the u
17、nits at each time step. The backward pass peels activities off the stack to compute the error derivatives at each time step. After the backward pass we add together the derivatives at all the different times for each weight.BPTT 前向传播BPTT 后向传播BP的困难 The backward pass is linear There is a big differenc
18、e between the forward and backward passes. In the forward pass we use squashing functions (like the logistic) to prevent the activity vectors from exploding. The backward pass, is completely linear. If you double the error derivatives at the final layer, all the error derivatives will double. The fo
19、rward pass determines the slope of the linear function used for backpropagating through each neuron.梯度的膨胀或消散 如果向后传播很多层,梯度 If the weights are small, the gradients shrink exponentially. If the weights are big, the gradients grow exponentially. 训练长序列 (100 time steps) RNN中,梯度很容易膨胀或消散 Avoid this by initi
20、alizing the weights very carefully. 即使好的初始化,也难以检测当前目标输出对很多步之前的输入的依赖关系 So RNNs have difficulty dealing with long-range dependencies. Long Short Term MemoryLong Short Term Memory, LSTM 解决了RNN长期(like hundreds of time steps)记忆的问题 Hochreiter & Schmidhuber (1997) LSTM是一个存储单元,使用logistic和linear单元执行乘法运算
21、Information gets into the cell whenever its “write” gate is on. Information stays in the cell so long as its “keep/forget” gate is on. Information can be read from the cell by turning on its “read” gate.LSTMBackpropagation through a memory cellread 1write 0keep 1 1.7read 0write 0 1.7read 0write 1 1.
22、7 1.7 1.7keep 1keep 0keep 0time LSTM 前向传播Input Gates:Forget Gates:Cells:Output Gates:Cell Outputs:LSTM 后向传播例:手写体生成 Use LSTM. Trained on IAM online handwriting/graves/handwriting.htmlDeep learning in practice软件 Theano Python Automatic differentiation Caffee C+ Fast Highly modu
23、larized Torch 7 C+ and Lua PaddlePaddle NICTA deep learning toolkit 监控梯度Repeat: update byUntil convergence.nwww,.,10),.,(0njjjwwLwwwFinite Difference:hhwLhwLwLwhwLhwLwLwjjjjjjhjj2,.)(,.)(,.)(,.)(,.)(lim,.)(0Mini-Batch Use mini-batch: Convergence speed. Parallelism.BxnijjjiwwxLwBww),.,(|10学习率 初始化 lar
24、gest learning rate that does not cause divergence of the training criterion. 渐减的学习率 AdaGrad (Duchi et al. 2011),max(0tt超参数搜索超参数learning rate.Early stopping.weight decay.Layer specific settings.Grid searchMulti-resolution searchRandom search James Bergstra and Yoshua Bengio, Random Search for Hyper-P
25、arameter Optimization (2012), in: Journal of Machine Learning Research, 13(281-305)小结 Deep Boltzmann Machines, DBM Convolutional Neural Network, CNN Recurrent Neural Networks, RNN 深度学习的使用References R. Salakhutdinov and G. Hinton. Deep Boltzmann Machines. ICAIS, 2009 R. Salakhutdinov and G. Hinton. A
26、 Better Way to Pretrain Deep Boltzmann Machines. NIPS, 2013 Jake Bouvrie(2014). Notes on Convolutional Neural Networks. Y. LeCun, L. Bottou, Y. Bengio, P. Haffner. Gradient-Based Learning Applied to Document Recognition, Proceedings of IEEE, Vol. 86, No. 11, pp. 2278-2324, 1998. Y. LeCun, Y. Bengio: Convolutional Networks for Images, Speech, and Time-Series, In Arbib, M.A. The hand book of Brain Theory and Neural Networks, MIT Press, 1995, 255-258 S. Hochreiter and J. Schmidhuber. Long s
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025届江西省抚州市临川第二中学高三(最后冲刺)化学试卷含解析
- 大班消防安全教案
- 传统文化教育
- 2025届青海省湟川中学高三(最后冲刺)化学试卷含解析
- 河南省南阳市六校2024-2025学年高一下学期(3月)第一次联考生物试卷
- 湖南省湘潭市2025届高三考前热身化学试卷含解析
- 江苏省盐城市盐都区2025年高三第二次调研化学试卷含解析
- 河南省鹤壁市淇县一中2025届高考化学倒计时模拟卷含解析
- 声门下吸引气管导管的护理
- 中医水肿诊断思维
- 河南退役军人专升本计算机真题答案
- 2024年10月自考13683管理学原理中级试题及答案含评分参考
- 《中国溃疡性结肠炎诊治指南(2023年)》解读
- 叉车日常维护保养检查记录表
- 施工总平面布置和临时设施布置技术标
- 曼昆《经济学原理》(微观经济学分册)第8版 全部答案
- Q∕GDW 12070-2020 配电网工程标准化设计图元规范
- (精心整理)小学英语特殊疑问句练习(带答案)
- 旋片泵设计说明书
- 小学一年级100以内加减法口算题(五篇)
- 广西壮族自治区建筑装饰装修工程消耗量定额(2013版)
评论
0/150
提交评论