Add structure of neural network mode

pull/2/head
benjas 5 years ago
parent 4ce2d93cbf
commit f924a1cc16

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

@ -154,6 +154,8 @@ cat = max(0, 5.1 - 3.2 + 1) + max(0, -1.7 - 3.2 + 1)
= 2.9 + 0 = 2.9
> max(0, x)的意思是x大于0取x小于0则取0
car = max(0, 1.3 - 4.9 + 1) + max(0, 2.0 - 4.9 + 1)
= max(0, -2.6) + max(0, -1.9)

@ -8,3 +8,44 @@
如何让 f 值更小就是改变x、y、z而损失函数也是这样那么我们分别求偏导则能得出每个值对结果的影响![1609311878585](assets/1609311878585.png)
**链式法则**
- 梯度是一步一步传的
![1609312362417](assets/1609312362417.png)
复杂的例子:![1609313400358](assets/1609313400358.png)
![1609313438317](assets/1609313438317.png)
#### 神经网络整体架构
类生物神经元
![1609313874088](assets/1609313874088.png)
> 左半边是生物学上的神经元,右半边是数学上的“神经元”,可以说是非常像。
整体架构
![1609313994725](assets/1609313994725.png)
- input layer输入层比如输入X有多少个x即有多少个input比如前面的猫有3千多像素点那么就有3千多个“圈”进行input。
- hidden layer 1指将X做了某些变换且每个圈与前者的全部圈都连接即是全连接为什么多了1个圈是表示可能会在原始特征的基础上做变换变成4个特征。具体如假设X输入的是年龄第一圈表示对年龄做平方第二个圈表示将年龄与其它值相加相乘等等。
- W1input是3个hidden layer 1是4个那么夹在中间的W1就是[3,4]的权重矩阵。
- hidden layer 2指在1的基础上再进行变换防止如果hidden layer 1的效果不好那么加多一层进行再加工。
- W2hidden layer 1是4个hidden layer 2是4个那么夹在中间的W2就是[4,4]的权重矩阵。
- output layer输出结果。
- W3hidden layer 2是4个output layer 2是1个那么夹在中间的W3就是[4,1]的权重矩阵。
整体大致公式:
- 基本架构:![1609314876275](1609314876275.png)
- 继续堆叠一层:![1609314948479](assets/1609314948479.png)
- 神经网络的强大之处在于,用更多的参数来拟合复杂的数据
Loading…
Cancel
Save