Last updated 5 years ago
L−layerNNL-layer\quad NNL−layerNN,则包含了L−1L-1L−1个隐藏层,最后的LLL层是输出层
a[l]a^{[l]}a[l]和W[l]W^{[l]}W[l]中的上标lll都是从111开始的,l=1,⋯ ,Ll=1,\cdots,Ll=1,⋯,L
输入xxx记为a[0]a^{[0]}a[0],把输出层y^\hat yy^记为a[L]a^{[L]}a[L]
XXX:(12288,209)(12288, 209)(12288,209)(with m=209m=209m=209 examples)
Shape of W
Shape of b
Activation
Shape of Activation
Layer 1
(n[1],12288)(n^{[1]},12288)(n[1],12288)
(n[1],1)(n^{[1]},1)(n[1],1)
Z[1]=W[1]X+b[1]Z^{[1]} = W^{[1]} X + b^{[1]}Z[1]=W[1]X+b[1]
(n[1],209)(n^{[1]},209)(n[1],209)
Layer 2
(n[2],n[1])(n^{[2]}, n^{[1]})(n[2],n[1])
(n[2],1)(n^{[2]},1)(n[2],1)
Z[2]=W[2]A[1]+b[2]Z^{[2]} = W^{[2]} A^{[1]} + b^{[2]}Z[2]=W[2]A[1]+b[2]
(n[2],209)(n^{[2]},209)(n[2],209)
⋮\vdots⋮
Layer L-1
(n[L−1],n[L−2])(n^{[L-1]}, n^{[L-2]})(n[L−1],n[L−2])
(n[L−1],1)(n^{[L-1]}, 1)(n[L−1],1)
Z[L−1]=W[L−1]A[L−2]+b[L−1]Z^{[L-1]} = W^{[L-1]} A^{[L-2]} + b^{[L-1]}Z[L−1]=W[L−1]A[L−2]+b[L−1]
(n[L−1],209)(n^{[L-1]}, 209)(n[L−1],209)
Layer L
(n[L],n[L−1])(n^{[L]}, n^{[L-1]})(n[L],n[L−1])
(n[L],1)(n^{[L]}, 1)(n[L],1)
Z[L]=W[L]A[L−1]+b[L]Z^{[L]} = W^{[L]} A^{[L-1]} + b^{[L]}Z[L]=W[L]A[L−1]+b[L]
(n[L],209)(n^{[L]}, 209)(n[L],209)