【Cutout】《Improved Regularization of Convolutional Neural Networks with Cutout》

在这里插入图片描述
arXiv-2017



1 Background and Motivation

随着深度学习技术的发展,CNN 在很多计算机视觉任务中崭露头角,但 increased representational power also comes increased probability of overfitting, leading to poor generalization.

为提升模型的泛化性能,模拟 object occlusion, 作者提出了 Cutout 数据增强的方法——randomly masking out square regions of input during training,take more of the image context into consideration when making decisions.
在这里插入图片描述

This technique encourages the network to better utilize the full context of the image, rather than relying on the presence of a small set of specific visual features(which may not always be present).

2 Related Work

  • Data Augmentation for Images
  • Dropout in Convolutional Neural Networks
  • Denoising Autoencoders & Context Encoders(self-supervised,挖去部分,网络补上,以强化特征)

3 Advantages / Contributions

监督学习中提出 Cutout 数据增强方法(dropout 的一种形式,自监督中也有类似方法)

4 Method

初始版:remove maximally activated features

在这里插入图片描述
在这里插入图片描述

最终版:随机中心点,正方形遮挡(可以在图片外,被图片边界截取后就不是正方形了)

使用时需要中心化一下(也即减去均值)

the dataset should be normalized about zero so that modified images will not have a large effect on the expected batch statistics.

5 Experiments

5.1 Datasets and Metrics

  • CIFAR-10(32x32)
  • CIFAR-100(32x32)
  • SVHN(Street View House Numbers,32x32)
  • STL-10(96x96)
    在这里插入图片描述
    评价指标为 top1 error

5.2 Experiments

1)CIFAR10 and CIFAR100

单个实验都重复跑了5次,±x
在这里插入图片描述
下图探索 cutout 中不同 patch length 的影响,
在这里插入图片描述
2)STL-10
在这里插入图片描述
3)Analysis of Cutout’s Effect on Activations
在这里插入图片描述
引入 cutout 后浅层激活均有提升,深层 in the tail end of the distribution.

The latter observation illustrates that cutout is indeed encouraging the network to take into account a wider variety of features when making predictions, rather than relying on the presence of a smaller number of features

再聚焦下单个样本的
在这里插入图片描述

6 Conclusion(own) / Future work

  • code:https://github.com/uoguelph-mlrg/Cutout

  • memory footprint 内存占用

  • 相关工作介绍 drop out 时,文章中出现了这句话:All activations are kept when evaluating the network, but the resulting output is scaled according to the dropout probability

    dropout在测试时应该如何处理?
    在这里插入图片描述

  • dropout 作用在 FC 上的效果比 Conv 上好,作者的解释是:1)convolutional layers already have much fewer parameters than fully-connected layers; 2)neighbouring pixels in images share much of the same information(丢一些无伤大雅)

  • cutout——连续区域的仅作用在输入层的 dropout 技术

    Dropout技术一览:可视化解释以及在DNN/CNN/RNN中的应用
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

Dropout on Conv layer

来自Dropout的那些事

Dropout 首次应用于 FC 层,后被推广至 Conv 层,Conv 层中的具体形式如何呢?

先回顾下 dropout 在 FC 层是如何发挥作用的

在这里插入图片描述
在这里插入图片描述

再看看其在 Conv 层中是如何发挥作用的

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

im2col

来自 复习一下卷积的核心操作:im2col大法!

核心步骤,im2col + segmm

caffe 中的数据是行优先(row-major)存储的

im2col是什么?
Rearrange image blocks into columns

输入图像batch input_num = 1
输入通道 input_channel = 1
输入图像高 input_h = 4;
输入图像宽 input_w = 4;
卷积核高 kernel_h = 3;
卷积核宽 kernel_w = 3;
步长 stride = 1;
pad = 0;

首先将输入图像的像素点按照“卷积区域”,挨个排列起来
在这里插入图片描述
输入三通道的时候
在这里插入图片描述
需要注意各通道im2col的数据在内存中也是连续存储的,全部弄好后拼成这样的矩阵!

kernal
在这里插入图片描述
kernel的通道数据在内存中也是连续存储的。(每行每列扫下来)

在这里插入图片描述
接下来就是矩阵乘法了,也就是所谓的 sgemm。
在这里插入图片描述
矩阵乘法可以直接使用 CUDA 中的 cublas 库,常用的也就是 3 个参数,M 是左边矩阵的行数,这里的 kernal 是一行,因此M=1;而 N 表示输出矩阵的列,也就是输出图像一共多少个像素点;K 表示左边输入矩阵的列,右边输入矩阵的行;

M = 1
N = output_h * output_w
K = input_channels * kernel_h * kernel_w

因为图像数据是连续存储,因此输出图像也可以如下图所示 output_h * output_w = 2*2:

在这里插入图片描述
如果我们输出的Tensor是多通道的,也就是说输入图像是 (1,3,224,224),输出是(1,3,112,112),那么参数变化为这样:

M=output_channels ,
N=output_h * output_w
K=input_channels * kernel_h * kernel_w

在这里插入图片描述
output_channels × output_h × output_w = 322

在这里插入图片描述

在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值