1. 程式人生 > >python資料科學基礎和吳恩達作業補缺補漏(三)

python資料科學基礎和吳恩達作業補缺補漏(三)

 Implement the following function, which pads all the images of a batch of examples X with zeros. Use np.pad. Note if you want to pad the array "a" of shape (5,5,5,5,5)(5,5,5,5,5) with pad = 1 for the 2nd dimension, pad = 3 for the 4th dimension and pad = 0

 for the rest, you would do:

a = np.pad(a, ((0,0), (1,1), (0,0), (3,3), (0,0)), 'constant', constant_values = (..,..))

Pooling layer

池化層減少了輸入的高度和寬度。它有助於減少計算,同時也有助於使功能檢測器在輸入中更不變數。這兩種型別的合用層是max-合用層:在輸入上滑動一個(f、ff、f)視窗,並在輸出中儲存視窗的最大值。平均池層:將一個(f,ff,f)視窗滑過輸入,並在輸出中儲存視窗的平均值。


YOLO:

YOLO(“你只看一次”)是一個很受歡迎的algoritm,因為它能達到很高的精確度,同時也能實時執行。

這個演算法在影象中“只看一次”,因為它只需要一個轉發傳播通過網路進行預測。在非最大的抑制之後,它將被識別的物件和邊界框一起輸出。