本課程的 Colabs 已過期,將於 2024 年 7 月移除。
機器學習範例:圖片分類
瞭解你的理解:卷積
雙維度 3x3 卷積篩選器套用至二維 4x4 輸入特徵對應 (未新增邊框間距):
![](https://developers.google.cn/static/machine-learning/practica/image-classification/images/cyu_convolution_shape.svg?hl=zh-tw)
輸出特徵圖的形狀為何?
2x2
3x3 篩選器會在 4x4 功能對應上滑動,因此可以放置 4 個不重複的位置,導致產生 2x2 輸出的特徵地圖:
![動畫:顯示在 4x4 特徵地圖上滑動的 3x3 卷積濾鏡。有 4 個不重複的位置可以放置 3x3 濾鏡,每個元素都對應至 2x2 輸出特徵對應中的 4 個元素中的一個。](https://developers.google.cn/static/machine-learning/practica/image-classification/images/cyu_convolution_shape_answer.gif?hl=zh-tw)
三對三籃球
雖然篩選器本身是 3x3,但輸出功能對應關係較少,因為在 4x4 輸入功能地圖上可放置篩選器的可能位置少於 9 (3 倍 3) 。
四輪驅動
如要產生與邊框間距維度相同的輸出特徵對應,且沒有邊框間距,卷積篩選器的形狀必須是 1x1。大於 1x1 的篩選器會產生輸出特徵對應,小於輸入特徵對應。由於我們的篩選條件是 3x3,因此輸出特徵對應必須小於 4x4。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2022-09-27 (世界標準時間)。
[null,null,["上次更新時間:2022-09-27 (世界標準時間)。"],[[["Applying a 3x3 convolutional filter to a 4x4 input feature map without padding results in a 2x2 output feature map."],["The output feature map is smaller than the input because the filter's size limits the number of positions it can occupy on the input."],["A 1x1 filter would be required to maintain the input's dimensions in the output without padding."]]],[]]