Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
book
提交
78aa9ad9
B
book
项目概览
PaddlePaddle
/
book
通知
17
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
40
列表
看板
标记
里程碑
合并请求
37
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
B
book
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
40
Issue
40
列表
看板
标记
里程碑
合并请求
37
合并请求
37
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
78aa9ad9
编写于
5月 28, 2019
作者:
L
lvmengsi
提交者:
GitHub
5月 28, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update formula link (#733)
update formula link for book/01
上级
aa717b29
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
14 deletion
+14
-14
01.fit_a_line/README.cn.md
01.fit_a_line/README.cn.md
+6
-6
01.fit_a_line/README.md
01.fit_a_line/README.md
+1
-1
01.fit_a_line/index.cn.html
01.fit_a_line/index.cn.html
+6
-6
01.fit_a_line/index.html
01.fit_a_line/index.html
+1
-1
未找到文件。
01.fit_a_line/README.cn.md
浏览文件 @
78aa9ad9
...
...
@@ -3,7 +3,7 @@
本教程源代码目录在
[
book/fit_a_line
](
https://github.com/PaddlePaddle/book/tree/develop/01.fit_a_line
)
, 初次使用请您参考
[
Book文档使用说明
](
https://github.com/PaddlePaddle/book/blob/develop/README.cn.md#运行这本书
)
。
### 说明:
###
### 说明:
1.
硬件环境要求:
本文可支持在CPU、GPU下运行
2.
Docker镜像支持的CUDA/cuDNN版本:
...
...
@@ -16,7 +16,7 @@
<p
align=
"center"
>
<img
src =
"https://github.com/
ceci3/book/blob/update_fit_a_line
/01.fit_a_line/image/formula_fit_a_line_1.png?raw=true"
width=
550
><br/>
<img
src =
"https://github.com/
PaddlePaddle/book/blob/develop
/01.fit_a_line/image/formula_fit_a_line_1.png?raw=true"
width=
550
><br/>
</p>
例如,在我们将要建模的房价预测问题里,$x_{ij}$是描述房子$i$的各种属性(比如房间的个数、周围学校和医院的个数、交通状况等),而 $y_i$是房屋的价格。
...
...
@@ -37,7 +37,7 @@
在波士顿房价数据集中,和房屋相关的值共有14个:前13个用来描述房屋相关的各种信息,即模型中的 $x_i$;最后一个值为我们要预测的该类房屋价格的中位数,即模型中的 $y_i$。因此,我们的模型就可以表示成:
<p
align=
"center"
>
<img
src =
"https://github.com/
ceci3/book/blob/update_fit_a_line
/01.fit_a_line/image/formula_fit_a_line_2.png?raw=true"
width=
350
><br/>
<img
src =
"https://github.com/
PaddlePaddle/book/blob/develop
/01.fit_a_line/image/formula_fit_a_line_2.png?raw=true"
width=
350
><br/>
</p>
$
\h
at{Y}$ 表示模型的预测结果,用来和真实值$Y$区分。模型要学习的参数即:$
\o
mega_1,
\l
dots,
\o
mega_{13}, b$。
...
...
@@ -47,7 +47,7 @@ $\hat{Y}$ 表示模型的预测结果,用来和真实值$Y$区分。模型要
对于线性回归模型来讲,最常见的损失函数就是均方误差(Mean Squared Error,
[
MSE
](
https://en.wikipedia.org/wiki/Mean_squared_error
)
)了,它的形式是:
<p
align=
"center"
>
<img
src =
"https://github.com/
ceci3/book/blob/update_fit_a_line
/01.fit_a_line/image/formula_fit_a_line_3.png?raw=true"
width=
200
><br/>
<img
src =
"https://github.com/
PaddlePaddle/book/blob/develop
/01.fit_a_line/image/formula_fit_a_line_3.png?raw=true"
width=
200
><br/>
</p>
即对于一个大小为$n$的测试集,$MSE$是$n$个数据预测结果误差平方的均值。
...
...
@@ -55,7 +55,7 @@ $\hat{Y}$ 表示模型的预测结果,用来和真实值$Y$区分。模型要
对损失函数进行优化所采用的方法一般为梯度下降法。梯度下降法是一种一阶最优化算法。如果$f(x)$在点$x_n$有定义且可微,则认为$f(x)$在点$x_n$沿着梯度的负方向$-▽f(x_n)$下降的是最快的。反复调节$x$,使得$f(x)$接近最小值或者极小值,调节的方式为:
<p
align=
"center"
>
<img
src =
"https://github.com/
ceci3/book/blob/update_fit_a_line
/01.fit_a_line/image/formula_fit_a_line_4.png?raw=true"
width=
250
><br/>
<img
src =
"https://github.com/
PaddlePaddle/book/blob/develop
/01.fit_a_line/image/formula_fit_a_line_4.png?raw=true"
width=
250
><br/>
</p>
其中λ代表学习率。这种调节的方法称为梯度下降法。
...
...
@@ -118,7 +118,7 @@ $\hat{Y}$ 表示模型的预测结果,用来和真实值$Y$区分。模型要
## 训练
`fit_a_line/train
er
.py`
演示了训练的整体过程。
`fit_a_line/train.py`
演示了训练的整体过程。
### 配置数据提供器(Datafeeder)
首先我们引入必要的库:
...
...
01.fit_a_line/README.md
浏览文件 @
78aa9ad9
...
...
@@ -118,7 +118,7 @@ In a more complex model training process, we often need more than one dataset: t
## Training
`fit_a_line/train
er
.py`
demonstrates the overall process of training.
`fit_a_line/train.py`
demonstrates the overall process of training.
### Configuring the Data feeder
...
...
01.fit_a_line/index.cn.html
浏览文件 @
78aa9ad9
...
...
@@ -45,7 +45,7 @@
本教程源代码目录在[book/fit_a_line](https://github.com/PaddlePaddle/book/tree/develop/01.fit_a_line), 初次使用请您参考[Book文档使用说明](https://github.com/PaddlePaddle/book/blob/develop/README.cn.md#运行这本书)。
### 说明:
###
### 说明:
1.硬件环境要求:
本文可支持在CPU、GPU下运行
2. Docker镜像支持的CUDA/cuDNN版本:
...
...
@@ -58,7 +58,7 @@
<p
align=
"center"
>
<img
src =
"https://github.com/
ceci3/book/blob/update_fit_a_line
/01.fit_a_line/image/formula_fit_a_line_1.png?raw=true"
width=
550
><br/>
<img
src =
"https://github.com/
PaddlePaddle/book/blob/develop
/01.fit_a_line/image/formula_fit_a_line_1.png?raw=true"
width=
550
><br/>
</p>
例如,在我们将要建模的房价预测问题里,$x_{ij}$是描述房子$i$的各种属性(比如房间的个数、周围学校和医院的个数、交通状况等),而 $y_i$是房屋的价格。
...
...
@@ -79,7 +79,7 @@
在波士顿房价数据集中,和房屋相关的值共有14个:前13个用来描述房屋相关的各种信息,即模型中的 $x_i$;最后一个值为我们要预测的该类房屋价格的中位数,即模型中的 $y_i$。因此,我们的模型就可以表示成:
<p
align=
"center"
>
<img
src =
"https://github.com/
ceci3/book/blob/update_fit_a_line
/01.fit_a_line/image/formula_fit_a_line_2.png?raw=true"
width=
350
><br/>
<img
src =
"https://github.com/
PaddlePaddle/book/blob/develop
/01.fit_a_line/image/formula_fit_a_line_2.png?raw=true"
width=
350
><br/>
</p>
$\hat{Y}$ 表示模型的预测结果,用来和真实值$Y$区分。模型要学习的参数即:$\omega_1, \ldots, \omega_{13}, b$。
...
...
@@ -89,7 +89,7 @@ $\hat{Y}$ 表示模型的预测结果,用来和真实值$Y$区分。模型要
对于线性回归模型来讲,最常见的损失函数就是均方误差(Mean Squared Error, [MSE](https://en.wikipedia.org/wiki/Mean_squared_error))了,它的形式是:
<p
align=
"center"
>
<img
src =
"https://github.com/
ceci3/book/blob/update_fit_a_line
/01.fit_a_line/image/formula_fit_a_line_3.png?raw=true"
width=
200
><br/>
<img
src =
"https://github.com/
PaddlePaddle/book/blob/develop
/01.fit_a_line/image/formula_fit_a_line_3.png?raw=true"
width=
200
><br/>
</p>
即对于一个大小为$n$的测试集,$MSE$是$n$个数据预测结果误差平方的均值。
...
...
@@ -97,7 +97,7 @@ $\hat{Y}$ 表示模型的预测结果,用来和真实值$Y$区分。模型要
对损失函数进行优化所采用的方法一般为梯度下降法。梯度下降法是一种一阶最优化算法。如果$f(x)$在点$x_n$有定义且可微,则认为$f(x)$在点$x_n$沿着梯度的负方向$-▽f(x_n)$下降的是最快的。反复调节$x$,使得$f(x)$接近最小值或者极小值,调节的方式为:
<p
align=
"center"
>
<img
src =
"https://github.com/
ceci3/book/blob/update_fit_a_line
/01.fit_a_line/image/formula_fit_a_line_4.png?raw=true"
width=
250
><br/>
<img
src =
"https://github.com/
PaddlePaddle/book/blob/develop
/01.fit_a_line/image/formula_fit_a_line_4.png?raw=true"
width=
250
><br/>
</p>
其中λ代表学习率。这种调节的方法称为梯度下降法。
...
...
@@ -160,7 +160,7 @@ $\hat{Y}$ 表示模型的预测结果,用来和真实值$Y$区分。模型要
## 训练
`fit_a_line/train
er
.py`演示了训练的整体过程。
`fit_a_line/train.py`演示了训练的整体过程。
### 配置数据提供器(Datafeeder)
首先我们引入必要的库:
...
...
01.fit_a_line/index.html
浏览文件 @
78aa9ad9
...
...
@@ -160,7 +160,7 @@ In a more complex model training process, we often need more than one dataset: t
## Training
`fit_a_line/train
er
.py` demonstrates the overall process of training.
`fit_a_line/train.py` demonstrates the overall process of training.
### Configuring the Data feeder
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录