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 ...
随机推荐
- POJ-3468 A Simple Problem with Integers (区间求和,成段加减)
You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of op ...
- 魔板 (bfs+康托展开)
# 10027. 「一本通 1.4 例 2」魔板 [题目描述] Rubik 先生在发明了风靡全球魔方之后,又发明了它的二维版本--魔板.这是一张有 888 个大小相同的格子的魔板: 1 2 3 4 8 ...
- C++析构函数的自动调用(析构函数必须是虚拟的,这样删除父类指针指向的子类对象,才能同时调用两者的析构函数,否则就没有机会调用子类析构函数)
class A {public: A() { printf("A \n"); } ~A() { printf(" ~A \n"); } // 这里不管写不写vi ...
- 固定导航栏(jquery)
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...
- 在Eclipse-jee-neon中配置Hibernate(jbosstools)
以下是在eclipse上安装Hibernate的插件,hibernate在编程上坚持出现,故需要在eclipse上进行如下安装. 首先把安装Hibernate插件,常用到JBoss,访问http:// ...
- linux NFS 客户端的安装
1. 安装 showmount [root@allentuns ~]# yum -y install showmount 2. 查看服务器共享 [root@allentuns ~]# showmoun ...
- GDB学习笔记
GDB是UNIX及UNIX-like下的调试工具.GDB这个调试工具相比于VC.z的优点是具有修复网络断点以及恢复链接等功能. 一.功能 一般来说,GDB主要帮助你完成下面四个方面的功能: 1.启动你 ...
- java中的Excel导出功能
public void exportExcel(Long activityId, HttpServletResponse response) throws IOException { // 获取统计报 ...
- super语句不必须放在方法第一行。
class A(object): pass class B(A): def __init__(self): self.__a = "B#a" super(B, self).__in ...
- jmeter进阶之Beanshell引用Java代码
在Jmeter实际的使用中,根据业务往往需要构造一些数据源,比如虚拟用户的账号信息等,为了快速灵活,较好的方式往往是通过代码来辅助生产数据. 故在Jmeter支持的众多 sampler 或 前/后置处 ...