0

【过时】神经网络中的若干问题

 3 years ago
source link: https://www.guofei.site/2017/12/07/ANN9.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

【过时】神经网络中的若干问题

2017年12月07日

Author: Guofei

文章归类: ,文章编号: 260


版权声明:本文作者是郭飞。转载随意,但需要标明原文链接,并通知本人
原文链接:https://www.guofei.site/2017/12/07/ANN9.html

Edit

几年前的多篇学习笔记,里面散落有很多过时内容。
把这些过时内容更新掉,作为纪念不舍得删,就同一移动到这里了。

训练方式

更新频率

How often to update the weights

  • Online :after each training case
  • Full batch:after a full sweep
  • Mini-batch:after a small sample of training data

学习率

  • fixed learning rate
  • Adapt the global learning rate
  • Adapt the learning rate on each connection
  • Don’t use steepest descent

    overfitting

  • 原因
    • data不好
    • target values unreliable
      • sampling error (eg: rectangle)
      • regularities:不知道是真实regularities还是sampling error
  • Ways to reduce overfitting
    • Weight-decay:keep weights small
    • Weight-sharing: insisting that many of the weights have the same value
    • early stopping
    • model averaging:train lots of different nenual nets. And average them
    • Bayesian fitting of nrnual nets: A fancy form of model averaging
    • Dropout:emitting hidden layer
    • Generative pre-trainning: (后面会讲到)

关于认知

The feature theory

  • A concept is a set of semantic features.
  • 因此knowledge以a vector of feature来表示

The structuralist theory

  • The meaning of concept lies in its relationships to other concept
  • 因此knowledge以relational graph 来表示

案例1:预测下一个word 见附件


案例2:图像中的物体识别(LEC5)

困难

  • segmentation
    • to tell which pieces is parts of the same object
    • parts of an object can be hidden behind other object
  • Lighting
  • Deformation
    • 各个部位变形,仍然是这个东西
  • 不同的造型,相同的功能,仍然叫一个名字
    • 例如,椅子
  • Viewpoint
    • dimension hop

解决方案:针对viewpoint

  • redundant invariant features
  • put a box around the object and use normalized pixels.
  • replicated features with pooling. (convolutional neural nets)CNN 卷积神经网络
  • use a hierarchy of parts that have explicit poses relative to the camera

针对dimension-hopping

解决方案: The judicious normalization approach 具体方法: put a box around the object and use it as a coordinate frame 优点:解决 translation, totation, scale, shear, stretch 然而,找到合适的box比较困难:

  • segmentation errors
  • occlusion(?遮光)
  • unusual orientation(?为什么呢)
  • 事实上,人脑是先识别再旋转的

首先要recognize the shape to get the box right.

  • 解决box的方案: the brute force normalization 具体方法: train阶段,用竖直的、切分良好的样本。test阶段遍历box所有的可能性

CNN模型

to constrain w1=w2w1=w2 we need Δw1=Δw2Δw1=Δw2 use ∂E∂w1+∂E∂w2∂E∂w1+∂E∂w2


传统神经网络采用back propagation 但是,

  • 层数太深,残差传播到最前面的层已经变得太小,,误差校正信号越来越小,出现所谓gradient diffusion。
  • 局部最小值(随机初始化导致的)
  • 只能做有监督学习 deep learning 用layer-wise pre-training deep learning的训练包括两步:训练和调优
    1. 训练: 逐层训练单层神经元,这样每次按单层神经元训练
    2. 调优: 所有层训练完后,用wake-sleep 算法调优
      1. 向上的权重用于“认知”,向下的权重用于“+生成”,wake-sleep 算法用来使认知和生成达成一致
      2. wake阶段: 认知过程,通过外界的特征和向上的权重(认知权重)产生每一层的抽象表示(结点状态),并且使用梯度下降修改层间的下行权重(生成权重)。也就是“如果现实跟我想象的不一样,改变我的权重使得我想象的东西就是这样的”。
    1. sleep阶段:生成过程,通过顶层表示(醒时学得的概念)和向下权重,生成底层的状态,同时修改层间向上的权重。也就是“如果梦中的景象不是我脑中的相应概念,改变我的认知权重使得这种景象在我看来就是这个概念”。

deep learning训练过程具体如下:

1)使用自下上升非监督学习(就是从底层开始,一层一层的往顶层训练): 采用无标定数据(有标定数据也可)分层训练各层参数,这一步可以看作是一个无监督训练过程,是和传统神经网络区别最大的部分(这个过程可以看作是feature learning过程): 具体的,先用无标定数据训练第一层,训练时先学习第一层的参数(这一层可以看作是得到一个使得输出和输入差别最小的三层神经网络的隐层),由于模型capacity的限制以及稀疏性约束,使得得到的模型能够学习到数据本身的结构,从而得到比输入更具有表示能力的特征;在学习得到第n-1层后,将n-1层的输出作为第n层的输入,训练第n层,由此分别得到各层的参数; 2)自顶向下的监督学习(就是通过带标签的数据去训练,误差自顶向下传输,对网络进行微调): 基于第一步得到的各层参数进一步fine-tune整个多层模型的参数,这一步是一个有监督训练过程;第一步类似神经网络的随机初始化初值过程,由于DL的第一步不是随机初始化,而是通过学习输入数据的结构得到的,因而这个初值更接近全局最优,从而能够取得更好的效果;所以deep learning效果好很大程度上归功于第一步的feature learning过程。


您的支持将鼓励我继续创作!

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK