Convolutional Neural Networks笔记(二)

Convolutional Neural Networks笔记(二)

第一周第四节课
第二周第五节课
第二周第九节课
第二周第十节课
第二周第十一节课

1.Padding

这里写图片描述
为什么卷积之前需要对图像进行padding?如果不用padding,会给你带来以下两个缺陷:
1.每次你使用卷积操作,你的图像都会缩小,那么你只能做有限次数的卷积;output_height = input_height - filter_height + 1 ,该公式是在stride=1的前提下。
2.并且图像边缘的像素,你对其进行一次操作,这样你就失去很多图像边缘的信息。

在CNN 中滤波器的边长最好是奇数

2.stride

output_height = (input_height + 2*padding_height - filter_height) / stride + 1.
如果不能整除,这里向下取整。

3.卷积的具体过程

这里写图片描述

这里写图片描述

4.Pooling Layers

这里写图片描述
这里写图片描述

5.CNN Example

这里写图片描述
这里写图片描述
上图是传统的LetNet-5结构示意图。
吴恩达老师说到,在进行超参数选择时,最好不要自己创造,而是看看其他文献。

6.Why Convolutions

卷积比较于完全链接神经层有两个优势:参数共享和链接的稀疏性
这里写图片描述
权重数目的减少,既和滤波器的权重共享有关系,还和稀疏连接有关系。
这里写图片描述
例如,在卷积中,右侧输出图像的左上角的第一个像素,它的计算只和输入图像的左上角3*3个像素有关系。但是,在全链接神经层中,输出层的每个像素,和输入层的所有像素都有关系。卷积中的这种连接,就是稀疏连接。
有一种说法:卷积神经网络会被用来捕捉平易不变性(translation invariance):
a picture of a cat shifted a couple of pixels to the right, is still pretty clearly a cat. And convolutional structure helps the neural network encode the fact that an image shifted a few pixels should result in pretty similar features and should probably be assigned the same oval label. And the fact that you are applying to same filter, knows all the positions of the image, both in the early layers and the late layers that helps a neural network automatically learn to be more robust or to better capture the desirable property of translation invariance.

猜你喜欢

转载自blog.csdn.net/feng_jiakai/article/details/81007901
今日推荐