Convolutional Neural Networks(4):Feature map size,Padding and Stride
在CNN(1)中,我们用到下图来说明卷积之后feature maps尺寸和深度的变化。这一节中,我们讨论feature map size, padding and stride。

首先,在Layer1中,输入是32x32的图片,而卷积之后为28x28,试问filter的size(no padding)? (答案是5x5)。 如果没答上来,请看下图:

I是一张7x7的图片,filter是3x3的,I*K生成的feature map是5x5的。所以我们推出feature map size公式为:

其中n(l)表示在l层中图片的大小,f(l)是filter的大小所以在最初的问题中filtersize=32-28+1=5。
而在convolution操作中,有一个padding参数可以在原图外围加上空白格,从而使feature map的size不发生变化。通常不使用padding的Convolution称为Valid Convolution,而使用padding输出相同size的feature map,则称为Same Convolution。Feature map和Padding的Size计算公式为:


其中,p(l)是padding的大小。使用Padding的原因主要有二:
第一,因为architecture的原因,不希望图片尺寸发生变化;
其二,如果不使用padding,在图片边缘的pixel只被计算了一次,其数据被低估了。
Stride是表示filter工作间隔的参数,默认是1,根据需要可以设置为其他值,在设置了Stride之后,feature map的计算公式为:

其中,s(l)是stride步幅的大小。当然,图片并不都是正方的,我们可以分别计算feature map的width和height

Convolutional Neural Networks(4):Feature map size,Padding and Stride的更多相关文章
- 机器视觉:Convolutional Neural Networks, Receptive Field and Feature Maps
CNN 大概是目前 CV 界最火爆的一款模型了,堪比当年的 SVM.从 2012 年到现在,CNN 已经广泛应用于CV的各个领域,从最初的 classification,到现在的semantic se ...
- 《Deep Feature Extraction and Classification of Hyperspectral Images Based on Convolutional Neural Networks》论文笔记
论文题目<Deep Feature Extraction and Classification of Hyperspectral Images Based on Convolutional Ne ...
- A Beginner's Guide To Understanding Convolutional Neural Networks(转)
A Beginner's Guide To Understanding Convolutional Neural Networks Introduction Convolutional neural ...
- (转)A Beginner's Guide To Understanding Convolutional Neural Networks Part 2
Adit Deshpande CS Undergrad at UCLA ('19) Blog About A Beginner's Guide To Understanding Convolution ...
- (转)A Beginner's Guide To Understanding Convolutional Neural Networks
Adit Deshpande CS Undergrad at UCLA ('19) Blog About A Beginner's Guide To Understanding Convolution ...
- [转]An Intuitive Explanation of Convolutional Neural Networks
An Intuitive Explanation of Convolutional Neural Networks https://ujjwalkarn.me/2016/08/11/intuitive ...
- 卷积神经网络用于视觉识别Convolutional Neural Networks for Visual Recognition
Table of Contents: Architecture Overview ConvNet Layers Convolutional Layer Pooling Layer Normalizat ...
- 【论文翻译】MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications
MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications 论文链接:https://arxi ...
- Convolutional Neural Networks for Visual Recognition
http://cs231n.github.io/ 里面有很多相当好的文章 http://cs231n.github.io/convolutional-networks/ Table of Cont ...
随机推荐
- Django中用 form 实现登录注册
1.forms模块 将Models和Forms结合到一起使用,将Forms中的类和Models中的类关联到一起,实现属性的共享 1.在forms.py中创建class,继承自forms.ModelFo ...
- 2019 Multi-University Training Contest 4 - 1010 - Minimal Power of Prime
http://acm.hdu.edu.cn/showproblem.php?pid=6623 题意,给50000个1e18级别的数N,求它质因数分解里面的最小的指数(不算0) 比赛的时候给划了一个1e ...
- D Makoto and a Blackboard
Makoto and a Blackboard time limit per test 2 seconds memory limit per test 256 megabytes input stan ...
- BCR-ABL融合基因及检测
费城染色体 费城染色体(Philadelphia chromosome, Ph (or Ph') chromosome),或称费城染色体易位(Philadelphia translocation),是 ...
- Floyd(弗洛伊德)算法(C语言)
转载:https://blog.csdn.net/qq_35644234/article/details/60875818 Floyd算法的介绍 算法的特点 弗洛伊德算法是解决任意两点间的最短路径的一 ...
- 20191126PHP连接数据(1)
引进数据 mysql> create database stu1 character set utf8; mysql> use stu1 mysql> set names utf8; ...
- the sum of two fixed value
the sum of two fixed value description Input an array and an integer, fina a pair of number in the a ...
- Anaconda 安装及Python 多版本间切换
安装 Anaconda 安装anaconda 安装较为简单,这里参考官方文档:https://docs.continuum.io/anaconda/install/linux.html 在文件目录下执 ...
- CentOS7搭建Flume与Kafka整合及基础操作与测试
前提 已完成Kafka的搭建,具体步骤参照CentOS7搭建Kafka单机环境及基础操作 Flume安装 下载 wget http://mirrors.tuna.tsinghua.edu.cn/apa ...
- 异步json发送put或者delete
第一种 put请求或者delete请求 直接写发送的情况 //批量删除 function batchDel() { var ids = []; $("#list-table").f ...