diff --git a/.github/workflows/Deploy_website.yml b/.github/workflows/Deploy_website.yml
index 5ecb32923..469116441 100644
--- a/.github/workflows/Deploy_website.yml
+++ b/.github/workflows/Deploy_website.yml
@@ -5,10 +5,11 @@ name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
+# push:
+# branches: [ master ]
+# pull_request:
+# branches: [ master ]
+ workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@@ -36,7 +37,7 @@ jobs:
# Installation dependency
- run: pip install git+https://github.com/IMSUVEN/mkdocs.git
- - run: pip install mkdocs-material==7.1.8 mkdocs-material-extensions==1.0.1 pymdown-extensions==8.2 jieba==0.42.1
+ - run: pip install mkdocs-material==7.1.8 mkdocs-material-extensions==1.0.1 pymdown-extensions==8.2 jieba==0.42.1 pygments==2.11.0
# Deploy website
- run: mkdocs gh-deploy --force
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/README.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/README.md"
index 88906461a..2b22a46e1 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/README.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/README.md"
@@ -56,22 +56,22 @@
|网络结构名称|网络结构图|应用领域|
|---|----|----|
-|单入
单出
一层|
|一元线性回归|
-|多入
单出
一层|
|多元线性回归|
-|多入
单出
一层|
|线性二分类
|
-|多入
多出
一层|
|线性多分类
|
-|单入
单出
两层|
|一元非线性回归/拟合
可以拟合任意复杂函数|
-|多入
单出
两层|
|非线性二分类|
-|多入
多出
两层|
|非线性多分类|
-|多入
多出
三层|
|非线性多分类|
-|多层全连接网络|
|非线性多分类|
-|带批归一化层的多层全连接网络|
|非线性多分类|
-|带丢弃层的多层全连接网络|
|非线性多分类|
-|简单的卷积神经网络|
|非线性多分类|
-|复杂的卷积神经网络|
|非线性多分类|
-|单向循环神经网络|
|非线性多分类|
-|双向循环神经网络|
|非线性多分类|
-|深度循环神经网络|
|非线性多分类|
+|单入
单出
一层|
|一元线性回归|
+|多入
单出
一层|
|多元线性回归|
+|多入
单出
一层|
|线性二分类
|
+|多入
多出
一层|
|线性多分类
|
+|单入
单出
两层|
|一元非线性回归/拟合
可以拟合任意复杂函数|
+|多入
单出
两层|
|非线性二分类|
+|多入
多出
两层|
|非线性多分类|
+|多入
多出
三层|
|非线性多分类|
+|多层全连接网络|
|非线性多分类|
+|带批归一化层的多层全连接网络|
|非线性多分类|
+|带丢弃层的多层全连接网络|
|非线性多分类|
+|简单的卷积神经网络|
|非线性多分类|
+|复杂的卷积神经网络|
|非线性多分类|
+|单向循环神经网络|
|非线性多分类|
+|双向循环神经网络|
|非线性多分类|
+|深度循环神经网络|
|非线性多分类|
## 写在后面
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2541\346\255\245 - \345\237\272\346\234\254\347\237\245\350\257\206/01.3-\347\245\236\347\273\217\347\275\221\347\273\234\347\232\204\345\237\272\346\234\254\345\267\245\344\275\234\345\216\237\347\220\206.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2541\346\255\245 - \345\237\272\346\234\254\347\237\245\350\257\206/01.3-\347\245\236\347\273\217\347\275\221\347\273\234\347\232\204\345\237\272\346\234\254\345\267\245\344\275\234\345\216\237\347\220\206.md"
index 279b9ee6c..691247511 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2541\346\255\245 - \345\237\272\346\234\254\347\237\245\350\257\206/01.3-\347\245\236\347\273\217\347\275\221\347\273\234\347\232\204\345\237\272\346\234\254\345\267\245\344\275\234\345\216\237\347\220\206.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2541\346\255\245 - \345\237\272\346\234\254\347\237\245\350\257\206/01.3-\347\245\236\347\273\217\347\275\221\347\273\234\347\232\204\345\237\272\346\234\254\345\267\245\344\275\234\345\216\237\347\220\206.md"
@@ -138,9 +138,11 @@ $$A=\sigma{(Z)}$$
$$
z1_1 = x_1 \cdot w1_{1,1}+ x_2 \cdot w1_{2,1}+b1_1
$$
+
$$
z1_2 = x_1 \cdot w1_{1,2}+ x_2 \cdot w1_{2,2}+b1_2
$$
+
$$
z1_3 = x_1 \cdot w1_{1,3}+ x_2 \cdot w1_{2,3}+b1_3
$$
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2541\346\255\245 - \345\237\272\346\234\254\347\237\245\350\257\206/02.1-\347\272\277\346\200\247\345\217\215\345\220\221\344\274\240\346\222\255.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2541\346\255\245 - \345\237\272\346\234\254\347\237\245\350\257\206/02.1-\347\272\277\346\200\247\345\217\215\345\220\221\344\274\240\346\222\255.md"
index 7b4f1fccc..413f9a8f5 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2541\346\255\245 - \345\237\272\346\234\254\347\237\245\350\257\206/02.1-\347\272\277\346\200\247\345\217\215\345\220\221\344\274\240\346\222\255.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2541\346\255\245 - \345\237\272\346\234\254\347\237\245\350\257\206/02.1-\347\272\277\346\200\247\345\217\215\345\220\221\344\274\240\346\222\255.md"
@@ -139,12 +139,15 @@ $$
$$
\frac{\partial{z}}{\partial{x}}=\frac{\partial{}}{\partial{x}}(x \cdot y)=y=9
$$
+
$$
\frac{\partial{z}}{\partial{y}}=\frac{\partial{}}{\partial{y}}(x \cdot y)=x=18
$$
+
$$
\frac{\partial{x}}{\partial{b}}=\frac{\partial{}}{\partial{b}}(2w+3b)=3
$$
+
$$
\frac{\partial{y}}{\partial{b}}=\frac{\partial{}}{\partial{b}}(2b+1)=2
$$
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.0-\345\215\225\345\205\245\345\215\225\345\207\272\345\215\225\345\261\202-\345\215\225\345\217\230\351\207\217\347\272\277\346\200\247\345\233\236\345\275\222.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.0-\345\215\225\345\205\245\345\215\225\345\207\272\345\215\225\345\261\202-\345\215\225\345\217\230\351\207\217\347\272\277\346\200\247\345\233\236\345\275\222.md"
index 030a77599..75925b8a7 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.0-\345\215\225\345\205\245\345\215\225\345\207\272\345\215\225\345\261\202-\345\215\225\345\217\230\351\207\217\347\272\277\346\200\247\345\233\236\345\275\222.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.0-\345\215\225\345\205\245\345\215\225\345\207\272\345\215\225\345\261\202-\345\215\225\345\217\230\351\207\217\347\272\277\346\200\247\345\233\236\345\275\222.md"
@@ -114,6 +114,7 @@ W=
w_{1} \\\\ w_{2} \\\\ w_{3}
\end{pmatrix}
$$
+
$$
Y=W^{\top}X+B=
\begin{pmatrix}
@@ -126,6 +127,7 @@ x_{3}
\end{pmatrix}
+b
$$
+
$$
=w_1 \cdot x_1 + w_2 \cdot x_2 + w_3 \cdot x_3 + b \tag{4}
$$
@@ -168,6 +170,7 @@ x_{3}
\end{pmatrix}
+b
$$
+
$$
=w_1 \cdot x_1 + w_2 \cdot x_2 + w_3 \cdot x_3 + b \tag{5}
$$
@@ -206,6 +209,7 @@ w_{3}
\end{pmatrix}
+b
$$
+
$$
=x_1 \cdot w_1 + x_2 \cdot w_2 + x_3 \cdot w_3 + b \tag{6}
$$
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.1-\346\234\200\345\260\217\344\272\214\344\271\230\346\263\225.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.1-\346\234\200\345\260\217\344\272\214\344\271\230\346\263\225.md"
index ce21d56ae..906be3862 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.1-\346\234\200\345\260\217\344\272\214\344\271\230\346\263\225.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.1-\346\234\200\345\260\217\344\272\214\344\271\230\346\263\225.md"
@@ -26,6 +26,7 @@ $$z_i \simeq y_i \tag{2}$$
其中,$x_i$ 是样本特征值,$y_i$ 是样本标签值,$z_i$ 是模型预测值。
如何学得 $w$ 和 $b$ 呢?均方差(MSE - mean squared error)是回归任务中常用的手段:
+
$$
J = \frac{1}{2m}\sum_{i=1}^m(z_i-y_i)^2 = \frac{1}{2m}\sum_{i=1}^m(y_i-wx_i-b)^2 \tag{3}
$$
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.2-\346\242\257\345\272\246\344\270\213\351\231\215\346\263\225.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.2-\346\242\257\345\272\246\344\270\213\351\231\215\346\263\225.md"
index dd74ce4c1..26f5ace11 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.2-\346\242\257\345\272\246\344\270\213\351\231\215\346\263\225.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.2-\346\242\257\345\272\246\344\270\213\351\231\215\346\263\225.md"
@@ -35,6 +35,7 @@ $$
#### 计算z的梯度
根据公式2:
+
$$
\frac{\partial loss}{\partial z_i}=z_i - y_i \tag{3}
$$
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.4-\345\244\232\346\240\267\346\234\254\350\256\241\347\256\227.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.4-\345\244\232\346\240\267\346\234\254\350\256\241\347\256\227.md"
index 2131dcd65..8cf6b5956 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.4-\345\244\232\346\240\267\346\234\254\350\256\241\347\256\227.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.4-\345\244\232\346\240\267\346\234\254\350\256\241\347\256\227.md"
@@ -112,6 +112,7 @@ $$
$$
其中:
+
$$
X =
\begin{pmatrix}
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.5-\346\242\257\345\272\246\344\270\213\351\231\215\347\232\204\344\270\211\347\247\215\345\275\242\345\274\217.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.5-\346\242\257\345\272\246\344\270\213\351\231\215\347\232\204\344\270\211\347\247\215\345\275\242\345\274\217.md"
index 0ee0452cb..46773c23f 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.5-\346\242\257\345\272\246\344\270\213\351\231\215\347\232\204\344\270\211\347\247\215\345\275\242\345\274\217.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/04.5-\346\242\257\345\272\246\344\270\213\351\231\215\347\232\204\344\270\211\347\247\215\345\275\242\345\274\217.md"
@@ -65,7 +65,6 @@ $repeat \lbrace \\\\
\quad \quad b=b-\eta \cdot db \\\\
\quad \rbrace \\\\
\rbrace$
-
***
#### 特点
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.1-\346\255\243\350\247\204\346\226\271\347\250\213\346\263\225.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.1-\346\255\243\350\247\204\346\226\271\347\250\213\346\263\225.md"
index b3c33b069..4e5ab3d65 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.1-\346\255\243\350\247\204\346\226\271\347\250\213\346\263\225.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.1-\346\255\243\350\247\204\346\226\271\347\250\213\346\263\225.md"
@@ -108,9 +108,11 @@ $$
$$
\frac{\partial J}{\partial W}=2X^{\top}XW - 2X^{\top}Y=0 \tag{14}
$$
+
$$
X^{\top}XW = X^{\top}Y \tag{15}
$$
+
$$
W=(X^{\top}X)^{-1}X^{\top}Y \tag{16}
$$
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.2-\347\245\236\347\273\217\347\275\221\347\273\234\346\263\225.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.2-\347\245\236\347\273\217\347\275\221\347\273\234\346\263\225.md"
index d746e90cd..088022839 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.2-\347\245\236\347\273\217\347\275\221\347\273\234\346\263\225.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.2-\347\245\236\347\273\217\347\275\221\347\273\234\346\263\225.md"
@@ -83,6 +83,7 @@ $B$ 是个单值,因为输出层只有一个神经元,所以只有一个bias
#### 输出层
由于我们只想完成一个回归(拟合)任务,所以输出层只有一个神经元。由于是线性的,所以没有用激活函数。
+
$$
\begin{aligned}
Z&=
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.4-\350\277\230\345\216\237\345\217\202\346\225\260\345\200\274.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.4-\350\277\230\345\216\237\345\217\202\346\225\260\345\200\274.md"
index 946a0c80b..6d217f62c 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.4-\350\277\230\345\216\237\345\217\202\346\225\260\345\200\274.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2542\346\255\245 - \347\272\277\346\200\247\345\233\236\345\275\222/05.4-\350\277\230\345\216\237\345\217\202\346\225\260\345\200\274.md"
@@ -78,6 +78,7 @@ z = x_1' w_1' + x_2' w_2' + b' \tag{z是预测值}
$$
由于训练时标签值(房价)并没有做标准化,意味着我们是用真实的房价做的训练,所以预测值和标签值应该相等,所以:
+
$$
y = z
$$
@@ -86,6 +87,7 @@ x_1 w_1 + x_2 w_2 + b = x_1' w_1' + x_2' w_2' + b' \tag{1}
$$
标准化的公式是:
+
$$
x' = \frac{x - x_{min}}{x_{max}-x_{min}} \tag{2}
$$
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2543\346\255\245 - \347\272\277\346\200\247\345\210\206\347\261\273/06.2-\347\272\277\346\200\247\344\272\214\345\210\206\347\261\273\345\256\236\347\216\260.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2543\346\255\245 - \347\272\277\346\200\247\345\210\206\347\261\273/06.2-\347\272\277\346\200\247\344\272\214\345\210\206\347\261\273\345\256\236\347\216\260.md"
index 83fd552f4..76a7184de 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2543\346\255\245 - \347\272\277\346\200\247\345\210\206\347\261\273/06.2-\347\272\277\346\200\247\344\272\214\345\210\206\347\261\273\345\256\236\347\216\260.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2543\346\255\245 - \347\272\277\346\200\247\345\210\206\347\261\273/06.2-\347\272\277\346\200\247\344\272\214\345\210\206\347\261\273\345\256\236\347\216\260.md"
@@ -85,6 +85,7 @@ $$
\frac{\partial loss}{\partial w_2}
\end{pmatrix}
$$
+
$$
=\begin{pmatrix}
\frac{\partial loss}{\partial z}\frac{\partial z}{\partial w_1} \\\\
@@ -95,6 +96,7 @@ $$
(a-y)x_2
\end{pmatrix}
$$
+
$$
=(x_1 \ x_2)^{\top} (a-y) \tag{4}
$$
diff --git "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2548\346\255\245 - \345\215\267\347\247\257\347\245\236\347\273\217\347\275\221\347\273\234/17.3-\345\215\267\347\247\257\347\232\204\345\217\215\345\220\221\344\274\240\346\222\255\345\216\237\347\220\206.md" "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2548\346\255\245 - \345\215\267\347\247\257\347\245\236\347\273\217\347\275\221\347\273\234/17.3-\345\215\267\347\247\257\347\232\204\345\217\215\345\220\221\344\274\240\346\222\255\345\216\237\347\220\206.md"
index a2b11f1b6..4e180c368 100644
--- "a/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2548\346\255\245 - \345\215\267\347\247\257\347\245\236\347\273\217\347\275\221\347\273\234/17.3-\345\215\267\347\247\257\347\232\204\345\217\215\345\220\221\344\274\240\346\222\255\345\216\237\347\220\206.md"
+++ "b/\345\237\272\347\241\200\346\225\231\347\250\213/A2-\347\245\236\347\273\217\347\275\221\347\273\234\345\237\272\346\234\254\345\216\237\347\220\206/\347\254\2548\346\255\245 - \345\215\267\347\247\257\347\245\236\347\273\217\347\275\221\347\273\234/17.3-\345\215\267\347\247\257\347\232\204\345\217\215\345\220\221\344\274\240\346\222\255\345\216\237\347\220\206.md"
@@ -27,8 +27,11 @@ $$Z = W*A+b \tag{0}$$
分解到每一项就是下列公式:
$$z_{11} = w_{11} \cdot a_{11} + w_{12} \cdot a_{12} + w_{21} \cdot a_{21} + w_{22} \cdot a_{22} + b \tag{1}$$
+
$$z_{12} = w_{11} \cdot a_{12} + w_{12} \cdot a_{13} + w_{21} \cdot a_{22} + w_{22} \cdot a_{23} + b \tag{2}$$
+
$$z_{21} = w_{11} \cdot a_{21} + w_{12} \cdot a_{22} + w_{21} \cdot a_{31} + w_{22} \cdot a_{32} + b \tag{3}$$
+
$$z_{22} = w_{11} \cdot a_{22} + w_{12} \cdot a_{23} + w_{21} \cdot a_{32} + w_{22} \cdot a_{33} + b \tag{4}$$
求损失函数$J$对$a_{11}$的梯度:
@@ -50,6 +53,7 @@ $$
$$
\frac{\partial J}{\partial a_{22}}=\frac{\partial J}{\partial z_{11}} \frac{\partial z_{11}}{\partial a_{22}}+\frac{\partial J}{\partial z_{12}} \frac{\partial z_{12}}{\partial a_{22}}+\frac{\partial J}{\partial z_{21}} \frac{\partial z_{21}}{\partial a_{22}}+\frac{\partial J}{\partial z_{22}} \frac{\partial z_{22}}{\partial a_{22}}
$$
+
$$
=\delta_{z11} \cdot w_{22} + \delta_{z12} \cdot w_{21} + \delta_{z21} \cdot w_{12} + \delta_{z22} \cdot w_{11} \tag{7}
$$
@@ -132,13 +136,19 @@ $$
正向公式:
$$z_{111} = w_{111} \cdot a_{11} + w_{112} \cdot a_{12} + w_{121} \cdot a_{21} + w_{122} \cdot a_{22}$$
+
$$z_{112} = w_{111} \cdot a_{12} + w_{112} \cdot a_{13} + w_{121} \cdot a_{22} + w_{122} \cdot a_{23}$$
+
$$z_{121} = w_{111} \cdot a_{21} + w_{112} \cdot a_{22} + w_{121} \cdot a_{31} + w_{122} \cdot a_{32}$$
+
$$z_{122} = w_{111} \cdot a_{22} + w_{112} \cdot a_{23} + w_{121} \cdot a_{32} + w_{122} \cdot a_{33}$$
$$z_{211} = w_{211} \cdot a_{11} + w_{212} \cdot a_{12} + w_{221} \cdot a_{21} + w_{222} \cdot a_{22}$$
+
$$z_{212} = w_{211} \cdot a_{12} + w_{212} \cdot a_{13} + w_{221} \cdot a_{22} + w_{222} \cdot a_{23}$$
+
$$z_{221} = w_{211} \cdot a_{21} + w_{212} \cdot a_{22} + w_{221} \cdot a_{31} + w_{222} \cdot a_{32}$$
+
$$z_{222} = w_{211} \cdot a_{22} + w_{212} \cdot a_{23} + w_{221} \cdot a_{32} + w_{222} \cdot a_{33}$$
求$J$对$a_{22}$的梯度:
@@ -176,18 +186,21 @@ z_{11} &= w_{111} \cdot a_{111} + w_{112} \cdot a_{112} + w_{121} \cdot a_{121}
\end{aligned}
\tag{10}
$$
+
$$
\begin{aligned}
z_{12} &= w_{111} \cdot a_{112} + w_{112} \cdot a_{113} + w_{121} \cdot a_{122} + w_{122} \cdot a_{123} \\\\
&+ w_{211} \cdot a_{212} + w_{212} \cdot a_{213} + w_{221} \cdot a_{222} + w_{222} \cdot a_{223}
\end{aligned}\tag{11}
$$
+
$$
\begin{aligned}
z_{21} &= w_{111} \cdot a_{121} + w_{112} \cdot a_{122} + w_{121} \cdot a_{131} + w_{122} \cdot a_{132} \\\\
&+ w_{211} \cdot a_{221} + w_{212} \cdot a_{222} + w_{221} \cdot a_{231} + w_{222} \cdot a_{232}
\end{aligned}\tag{12}
$$
+
$$
\begin{aligned}
z_{22} &= w_{111} \cdot a_{122} + w_{112} \cdot a_{123} + w_{121} \cdot a_{132} + w_{122} \cdot a_{133} \\\\
@@ -321,6 +334,7 @@ $$
$$
z = x * w
$$
+
$$
loss = \frac{1}{2}(z-y)^2
$$