zoukankan      html  css  js  c++  java
  • 论文解读《Understanding the Effective Receptive Field in Deep Convolutional Neural Networks》

    感知野的概念尤为重要,对于理解和诊断CNN网络是否工作,其中一个神经元的感知野之外的图像并不会对神经元的值产生影响,所以去确保这个神经元覆盖的所有相关的图像区域是十分重要的;
    需要对输出图像的单个像素进行预测的任务,使每一个输出像素具有一个比较大的感知野是十分重要的,在做预测试时,每一个关键的信息就不会被遗漏。

    增大感知野的方法: 理论上可以通过搭建更多的层的网络实现感知域的线性增加,靠着卷积过滤器的增加; 也可以使用下采样的方法,池化,增加感知域,目前通常都结合了这两种技术;

    堆叠不同层的convnets, 最后输出矩阵的单个神经元的表征的感知域的大小显然不一样;感知域越大,这意味着它应该学习距离更远的对象之间的关系

    empirical, 层数越深, 能够感知的patch的尺寸也越大,但是这样会付出更多的计算成本和时间消耗,所以需要通过traceback:

    function receptive_field_sizes()
    
    
    % compute input size from a given output size
    f = @(output_size, ksize, stride) (output_size - 1) * stride + ksize;
    
    
    %% n=1 discriminator
    
    % fix the output size to 1 and derive the receptive field in the input
    out = ...
    f(f(f(1, 4, 1), ...   % conv2 -> conv3
                 4, 1), ...   % conv1 -> conv2
                 4, 2);       % input -> conv1
    
    fprintf('n=1 discriminator receptive field size: %d
    ', out);
    
    
    %% n=2 discriminator
    
    % fix the output size to 1 and derive the receptive field in the input
    out = ...
    f(f(f(f(1, 4, 1), ...   % conv3 -> conv4
                 4, 1), ...   % conv2 -> conv3
                 4, 2), ...   % conv1 -> conv2
                 4, 2);       % input -> conv1
    
    fprintf('n=2 discriminator receptive field size: %d
    ', out);
    
    
    %% n=3 discriminator
    
    % fix the output size to 1 and derive the receptive field in the input
    out = ...
    f(f(f(f(f(1, 4, 1), ...   % conv4 -> conv5
                 4, 1), ...   % conv3 -> conv4
                 4, 2), ...   % conv2 -> conv3
                 4, 2), ...   % conv1 -> conv2
                 4, 2);       % input -> conv1
    
    fprintf('n=3 discriminator receptive field size: %d
    ', out);
    
    
    %% n=4 discriminator
    
    % fix the output size to 1 and derive the receptive field in the input
    out = ...
    f(f(f(f(f(f(1, 4, 1), ...   % conv5 -> conv6
                 4, 1), ...   % conv4 -> conv5
                 4, 2), ...   % conv3 -> conv4
                 4, 2), ...   % conv2 -> conv3
                 4, 2), ...   % conv1 -> conv2
                 4, 2);       % input -> conv1
    
    fprintf('n=4 discriminator receptive field size: %d
    ', out);
    
    
    %% n=5 discriminator
    
    % fix the output size to 1 and derive the receptive field in the input
    out = ...
    f(f(f(f(f(f(f(1, 4, 1), ...   % conv6 -> conv7
                 4, 1), ...   % conv5 -> conv6
                 4, 2), ...   % conv4 -> conv5
                 4, 2), ...   % conv3 -> conv4
                 4, 2), ...   % conv2 -> conv3
                 4, 2), ...   % conv1 -> conv2
                 4, 2);       % input -> conv1
    
    fprintf('n=5 discriminator receptive field size: %d
    ', out);
    

      

    作者发现 并不是所有在感知域中的像素 都图对于输出单元具有相同的贡献: 直观的来说,感知野中间的像素对于输出会有更大的影响。

    前向传播中,感知野中间的像素能够传播信息到输出通过许多不同的路径,边缘的像素就相对较少。这就造成了,在反向中,通过这些路径传来的梯度,使得中间像素有更大量级的梯度更新。(In the forward pass, central pixels can propagate information to the output through many different paths, while the pixels in the outer area of the receptive field have very few paths to propagate its impact. In the backward pass, gradients from an output unit are propagated across all the paths, and therefore the central pixels have a much larger magnitude for the gradient from that output).

    实验

    如图,感知野的影响分布是呈现高斯分布的, 作者发现了 理论感知域中的有效部分其实是非常微小的,因为高斯分布从中间衰减得十分的快。

    实验的目的是:确定多少个输入感知野的像素点影响着输出神经元;

    --如上图所示,在残差网络中不使用池化和下采样方法,随着训练的进行,有效感知野的范围在提升,同时即时感知野的大小已经大于了整个图像的整个大小,有效感知野的范围还是不能够覆盖整个图像。

    --在残差网络架构的模型中,使用subsampling 技术,理论感知域增加的非常大,但是有效感知域也是十分小的(如上图的右边Cam所示,堆叠多个VGG);有效减缓 有效感知域的高斯分布的方法带来的影响

    -- 和直接搭建多层卷积网络相比,下采样和扩张卷积( dilate conv)技术都可以增大有效感知野的大小,如下图所示:

     如何有效的对抗感知野的高斯分布呢?

    -- 操纵权重的初始化 使卷积核中心的权值更小,外部的权值更大,优化 w 去最大化 有效感知野的大小。

    解决这个优化问题,就得到了这样一个解:在卷积核的4个角上平均分配权值,而其他地方都为0,===》得到一些 这样分布的初始化方法 可以提高整体的速度

    -- 认为 从CNN的结构来看是一个很好的增大有效感知域的措施,比如 dilate conv,skip-connection 使得感知野更小了,dropout 并不会改变有效感知野

    思考

    很多方法的模型并没有考虑有效感知野,而是默认搭建的模型理论感知野和图像的大小差不多就为最佳,其实有效感知野只是一小部分,存在模型性能的加大提升空间;

    可以在现有方法的改进中,引入有效感知野的想法,使用扩张卷积和逆高斯分布的权重初始化等方法,抵消感知野的高斯分布影响;

  • 相关阅读:
    jQuery serialize()方法无法获取表单数据
    gorm 零值不更新问题
    SpringCloud Nacos使用和配置,SpringCloud Nacos 服务注册中心配置使用
    Nacos longPolling error,Nacos1.4.1服务配置文件更新一次后报错
    Windows Mysql5.7安装和配置,Windows 安装多个Mysql
    SpringCloud Gateway使用和配置,SpringCloud Gateway predicates详细配置
    Windows RabbitMQ_3.8 安装和配置,Windows erlang下载
    SpringCloud Hystrix dashboard2.2.7使用和配置,SpringCloud Hystrix dashboard服务监控
    SpringCloud Hystrix使用和配置,SpringCloud Hystrix服务熔断降级
    SpringCloud OpenFeign使用和配置,Java OpenFeign 使用教程
  • 原文地址:https://www.cnblogs.com/ChenKe-cheng/p/11470204.html
Copyright © 2011-2022 走看看