Browse Source

optimize layers' count

master
scruel 7 years ago
parent
commit
682dfefbe2
5 changed files with 16 additions and 13 deletions
  1. +5
    -5
      README.md
  2. +4
    -3
      week4.html
  3. +5
    -3
      week4.md
  4. +1
    -1
      week5.html
  5. +1
    -1
      week5.md

+ 5
- 5
README.md View File

@@ -74,17 +74,17 @@ This work is licensed under a [Creative Commons Attribution-NonCommercial 4.0 In



[知乎文章][zhihu]
Copyright © Scruel. All Rights Reserved.



By: Scruel
[知乎文章][zhihu]

[zhihu]: https://zhuanlan.zhihu.com/p/32781741
[baidupan]: https://pan.baidu.com/s/1mkmnRIC
[bilibili_zh]: http://www.bilibili.com/video/av9912938?bbid=F8173D95-FF96-47EF-B7F4-0779D698B8051978infoc
[bilibili_en1]: https://www.bilibili.com/video/av17624209/?from=search&seid=15848135050308500663
[bilibili_en2]: https://www.bilibili.com/video/av17624412/?from=search&seid=15848135050308500663
[bilibili_zh]: http://www.bilibili.com/video/av9912938
[bilibili_en1]: https://www.bilibili.com/video/av17624209
[bilibili_en2]: https://www.bilibili.com/video/av17624412/
[GitHub with MathJax]: https://chrome.google.com/webstore/detail/ioemnmodlmafdkllaclgeombjnmnbima
[Typora]: https://typora.io/
[honor code]: https://www.coursera.org/learn/machine-learning/supplement/nh65Z/machine-learning-honor-code

+ 4
- 3
week4.html
File diff suppressed because it is too large
View File


+ 5
- 3
week4.md View File

@@ -84,11 +84,11 @@ $Size(\Theta^{(2)})=s_3 \times (s_2 + 1) = 1 \times 4$

![](image/20180116_001543.png)

第 $1$ 层的所有激活单元应用激活函数,从而得到第 $2$ 层激活单元的值:
输入层(Layer 1)的所有激活单元应用激活函数,从而得到隐藏层(Layer 2)中激活单元的值:

$\begin{align*} a_1^{(2)} = g(\Theta_{10}^{(1)}x_0 + \Theta_{11}^{(1)}x_1 + \Theta_{12}^{(1)}x_2 + \Theta_{13}^{(1)}x_3) \newline a_2^{(2)} = g(\Theta_{20}^{(1)}x_0 + \Theta_{21}^{(1)}x_1 + \Theta_{22}^{(1)}x_2 + \Theta_{23}^{(1)}x_3) \newline a_3^{(2)} = g(\Theta_{30}^{(1)}x_0 + \Theta_{31}^{(1)}x_1 + \Theta_{32}^{(1)}x_2 + \Theta_{33}^{(1)}x_3) \newline \end{align*}$

第 $2$ 层的所有激活单元应用激活函数,从而得到输出:
Layer 2 中的所有激活单元应用激活函数,从而得到输出:

$h_\Theta(x) = a_1^{(3)} = g(\Theta_{10}^{(2)}a_0^{(2)} + \Theta_{11}^{(2)}a_1^{(2)} + \Theta_{12}^{(2)}a_2^{(2)} + \Theta_{13}^{(2)}a_3^{(2)})$

@@ -130,10 +130,12 @@ ${{z}^{\left( 2 \right)}}={{\Theta }^{\left( 1 \right)}} {{X}^{T}}$,这时 $z^



当然,神经网络不仅限于三层,每层的激活单元数量也并不固定:
当然,神经网络可有多层,每层的激活单元数量也并不固定:

![](image/20180116_105545.png)

> 我们习惯于将输入层称为神经网络的第 0 层,如上图的神经网络被称为三层网络。

## 8.5 例子和直观理解1(Examples and Intuitions I)

为了更好的理解神经网络,举例单层神经网络进行逻辑运算的例子。


+ 1
- 1
week5.html
File diff suppressed because it is too large
View File


+ 1
- 1
week5.md View File

@@ -159,7 +159,7 @@ $J(\Theta) ={y}\log \left( 1+{{e}^{-z^{(L)}}} \right)+\left( 1-{y} \right)\log \

![](image/20180121_110111.png)

再次为了便于计算,我们用到如上图这个四层神经网络。
再次为了便于计算,我们用到如上图这个三层(输入层一般不计数)神经网络。

忆及 $z^{(l)} = \Theta^{(l-1)}a^{(l-1)}$,我们有 $h_\Theta(x)=a^{(4)}= g(z^{(4)})=g(\Theta^{(3)}a^{(3)})$



Loading…
Cancel
Save