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.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章