4.1 深层神经网络(Deep L-layer neural network)

LlayerNNL-layer\quad NN,则包含了L1L-1个隐藏层,最后的LL层是输出层

a[l]a^{[l]}W[l]W^{[l]}中的上标ll都是从11开始的,l=1,,Ll=1,\cdots,L

输入xx记为a[0]a^{[0]}​​,把输出层y^\hat y记为a[L]a^{[L]}

XX(12288,209)(12288, 209)(with m=209m=209 examples)

Shape of W

Shape of b

Activation

Shape of Activation

Layer 1

(n[1],12288)(n^{[1]},12288)

(n[1],1)(n^{[1]},1)

Z[1]=W[1]X+b[1]Z^{[1]} = W^{[1]} X + b^{[1]}

(n[1],209)(n^{[1]},209)

Layer 2

(n[2],n[1])(n^{[2]}, n^{[1]})

(n[2],1)(n^{[2]},1)

Z[2]=W[2]A[1]+b[2]Z^{[2]} = W^{[2]} A^{[1]} + b^{[2]}

(n[2],209)(n^{[2]},209)

\vdots

\vdots

\vdots

\vdots

\vdots

Layer L-1

(n[L1],n[L2])(n^{[L-1]}, n^{[L-2]})

(n[L1],1)(n^{[L-1]}, 1)

Z[L1]=W[L1]A[L2]+b[L1]Z^{[L-1]} = W^{[L-1]} A^{[L-2]} + b^{[L-1]}

(n[L1],209)(n^{[L-1]}, 209)

Layer L

(n[L],n[L1])(n^{[L]}, n^{[L-1]})

(n[L],1)(n^{[L]}, 1)

Z[L]=W[L]A[L1]+b[L]Z^{[L]} = W^{[L]} A^{[L-1]} + b^{[L]}

(n[L],209)(n^{[L]}, 209)

Last updated