Skip to content

Commit f1e3ade

Browse files
committed
update chinese catalog
1 parent 140edd2 commit f1e3ade

39 files changed

+102
-110
lines changed

cmake/FindSphinx.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function( Sphinx_add_target target_name builder conf cache source destination )
7272
${source}
7373
${destination}
7474
COMMENT "Generating sphinx documentation: ${builder}"
75-
COMMAND ln -s ${destination}/index_*.html ${destination}/index.html
75+
COMMAND ln -sf ${destination}/index_*.html ${destination}/index.html
7676
)
7777

7878
set_property(

doc/api/index_cn.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
API
2-
===
1+
API中文手册
2+
============
33

44
DataProvider API
55
----------------

doc/getstarted/basic_usage/index_cn.rst

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
简介
2-
====
1+
经典的线性回归任务
2+
==================
33

44
PaddlePaddle是源于百度的一个深度学习平台。这份简短的介绍将向你展示如何利用PaddlePaddle来解决一个经典的线性回归问题。
55

6-
1. 一个经典的任务
7-
-----------------
6+
任务简介
7+
--------
88

99
我们展示如何用PaddlePaddle解决 `单变量的线性回归 <https://www.baidu.com/s?wd=单变量线性回归>`_ 问题。线性回归的输入是一批点 `(x, y)` ,其中 `y = wx + b + ε`, 而 ε 是一个符合高斯分布的随机变量。线性回归的输出是从这批点估计出来的参数 `w` 和 `b` 。
1010

1111
一个例子是房产估值。我们假设房产的价格(y)是其大小(x)的一个线性函数,那么我们可以通过收集市场上房子的大小和价格,用来估计线性函数的参数w 和 b。
1212

13-
2. 准备数据
13+
准备数据
1414
-----------
1515

1616
假设变量 `x` 和 `y` 的真实关系为: `y = 2x + 0.3 + ε`,这里展示如何使用观测数据来拟合这一线性关系。首先,Python代码将随机产生2000个观测点,作为线性回归的输入。下面脚本符合PaddlePaddle期待的读取数据的Python程序的模式。
@@ -28,7 +28,7 @@ PaddlePaddle是源于百度的一个深度学习平台。这份简短的介绍
2828
x = random.random()
2929
yield [x], [2*x+0.3]
3030
31-
3. 训练模型
31+
训练模型
3232
-----------
3333

3434
为了还原 `y = 2x + 0.3`,我们先从一条随机的直线 `y' = wx + b` 开始,然后利用观测数据调整 `w` 和 `b` 使得 `y'` 和 `y` 的差距不断减小,最终趋于接近。这个过程就是模型的训练过程,而 `w` 和 `b` 就是模型的参数,即我们的训练目标。
@@ -79,7 +79,7 @@ PaddlePaddle是源于百度的一个深度学习平台。这份简短的介绍
7979
8080
PaddlePaddle将在观测数据集上迭代训练30轮,并将每轮的模型结果存放在 `./output` 路径下。从输出日志可以看到,随着轮数增加误差代价函数的输出在不断的减小,这意味着模型在训练数据上不断的改进,直到逼近真实解:` y = 2x + 0.3 `
8181

82-
4. 模型检验
82+
模型检验
8383
-----------
8484

8585
训练完成后,我们希望能够检验模型的好坏。一种常用的做法是用学习的模型对另外一组测试数据进行预测,评价预测的效果。在这个例子中,由于已经知道了真实答案,我们可以直接观察模型的参数是否符合预期来进行检验。
@@ -106,10 +106,3 @@ PaddlePaddle将每个模型参数作为一个numpy数组单独存为一个文件
106106
从图中可以看到,虽然 `w` 和 `b` 都使用随机值初始化,但在起初的几轮训练中它们都在快速逼近真实值,并且后续仍在不断改进,使得最终得到的模型几乎与真实模型一致。
107107

108108
这样,我们用PaddlePaddle解决了单变量线性回归问题, 包括数据输入、模型训练和最后的结果验证。
109-
110-
5. 推荐后续阅读
111-
---------------
112-
113-
- `安装/编译 <../build_and_install/index.html>`_ :PaddlePaddle的安装与编译文档。
114-
- `快速入门 <../demo/quick_start/index.html>`_ :使用商品评论分类任务,系统性的介绍如何一步步改进,最终得到产品级的深度模型。
115-
- `示例 <../demo/index.html>`_ :各种实用案例,涵盖图像、文本、推荐等多个领域。

doc/getstarted/basic_usage/index_en.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
Basic Usage
2-
=============
1+
Simple Linear Regression
2+
========================
33

44
PaddlePaddle is a deep learning platform open-sourced by Baidu. With PaddlePaddle, you can easily train a classic neural network within a couple lines of configuration, or you can build sophisticated models that provide state-of-the-art performance on difficult learning tasks like sentiment analysis, machine translation, image caption and so on.
55

6-
1. A Classic Problem
7-
---------------------
6+
Problem Background
7+
------------------
88

99
Now, to give you a hint of what using PaddlePaddle looks like, let's start with a fundamental learning problem - `simple linear regression <https://en.wikipedia.org/wiki/Simple_linear_regression>`_: you have observed a set of two-dimensional data points of ``X`` and ``Y``, where ``X`` is an explanatory variable and ``Y`` is corresponding dependent variable, and you want to recover the underlying correlation between ``X`` and ``Y``. Linear regression can be used in many practical scenarios. For example, ``X`` can be a variable about house size, and ``Y`` a variable about house price. You can build a model that captures relationship between them by observing real estate markets.
1010

11-
2. Prepare the Data
12-
--------------------
11+
Prepare the Data
12+
-----------------
1313

1414
Suppose the true relationship can be characterized as ``Y = 2X + 0.3``, let's see how to recover this pattern only from observed data. Here is a piece of python code that feeds synthetic data to PaddlePaddle. The code is pretty self-explanatory, the only extra thing you need to add for PaddlePaddle is a definition of input data types.
1515

@@ -26,8 +26,8 @@ Suppose the true relationship can be characterized as ``Y = 2X + 0.3``, let's se
2626
x = random.random()
2727
yield [x], [2*x+0.3]
2828
29-
3. Train a NeuralNetwork
30-
-------------------------
29+
Train a NeuralNetwork
30+
----------------------
3131

3232
To recover this relationship between ``X`` and ``Y``, we use a neural network with one layer of linear activation units and a square error cost layer. Don't worry if you are not familiar with these terminologies, it's just saying that we are starting from a random line ``Y' = wX + b`` , then we gradually adapt ``w`` and ``b`` to minimize the difference between ``Y'`` and ``Y``. Here is what it looks like in PaddlePaddle:
3333

@@ -73,8 +73,8 @@ Now that everything is ready, you can train the network with a simple command li
7373
This means that PaddlePaddle will train this network on the synthectic dataset for 30 passes, and save all the models under path ``./output``. You will see from the messages printed out during training phase that the model cost is decreasing as time goes by, which indicates we are getting a closer guess.
7474

7575

76-
4. Evaluate the Model
77-
-----------------------
76+
Evaluate the Model
77+
-------------------
7878

7979
Usually, a different dataset that left out during training phase should be used to evalute the models. However, we are lucky enough to know the real answer: ``w=2, b=0.3``, thus a better option is to check out model parameters directly.
8080

doc/getstarted/build_and_install/index_cn.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
编译与安装
2-
========================
2+
==========
33

44
安装
55
++++
@@ -24,4 +24,4 @@ PaddlePaddle提供数个预编译的二进制来进行安装,包括Docker镜
2424
.. toctree::
2525
:maxdepth: 1
2626

27-
cmake/build_from_source_cn.rst
27+
cmake/build_from_source_cn.rst

doc/getstarted/index_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GET STARTED
1+
新手入门
22
============
33

44
.. toctree::

doc/howto/concepts/nn_cn.rst

Lines changed: 0 additions & 3 deletions
This file was deleted.

doc/howto/concepts/program_concepts_cn.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

doc/howto/deep_model/index_cn.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

doc/howto/deep_model/index_en.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)