1. 程式人生 > >《深度學習——Andrew Ng》第一課第四周程式設計作業

《深度學習——Andrew Ng》第一課第四周程式設計作業

Building your Deep Neural Network: Step by Step

這裡寫圖片描述

這裡寫圖片描述

3.2 - L-layer Neural Network

The initialization for a deeper L-layer neural network is more complicated because there are many more weight matrices and bias vectors. When completing the initialize_parameters_deep, you should make sure that your dimensions match between each layer. Recall that

n[l] is the number of units in layer l. Thus for example if the size of our input X is (12288,209) (with m=209 examples) then:

**Shape of W** **Shape of b** **Activation** **Shape of Activation**
**Layer 1** (n[1],12288) (n[1],1) Z[1]=W[1]X+b[1] (n[1],209)
**Layer 2** (n[2],n[1]) (n[2],1) Z[2]=W[2]A[1]+b[2] (n[2]
,209)
**Layer L-1** (n[L1],n[L2]) (n[L1],1) Z[L1]=W[L1]A[L2]+b[L1] (n[L1],209)
**Layer L** (n[L],n[L1]) (n[L],1)