Skip to content

Commit 669da50

Browse files
committed
follow comments2
1 parent 4c28d40 commit 669da50

File tree

9 files changed

+29
-31
lines changed

9 files changed

+29
-31
lines changed

doc/getstarted/build_and_install/build_from_source_cn.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ PaddlePaddle可以使用cuDNN v5.1之后的任何一个版本来编译运行,
103103
编译选项的设置
104104
++++++++++++++
105105

106-
PaddePaddle通过编译时指定路径来实现引用各种BLAS/CUDA/cuDNN库。cmake编译时,首先在系统路径(/usr/lib\:/usr/local/lib)中搜索这几个库,同时也会读取相关路径变量来进行搜索。 通过使用 ``-D`` 命令可以设置,例如
106+
PaddePaddle通过编译时指定路径来实现引用各种BLAS/CUDA/cuDNN库。cmake编译时,首先在系统路径:code:`/usr/lib:/usr/local/lib` )中搜索这几个库,同时也会读取相关路径变量来进行搜索。 通过使用 ``-D`` 命令可以设置,例如
107107

108108
.. code-block:: bash
109109
110110
cmake .. -DWITH_GPU=ON -DWITH_TESTING=OFF -DCUDNN_ROOT=/opt/cudnnv5
111111
112-
注意:这几个编译选项的设置,只在第一次cmake的时候有效。如果之后想要重新设置,推荐清理整个编译目录(``rm -rf``)后,再指定。
112+
**注意:这几个编译选项的设置,只在第一次cmake的时候有效。如果之后想要重新设置,推荐清理整个编译目录(** :code:`rm -rf` )**后,再指定。**

doc/getstarted/build_and_install/build_from_source_en.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,11 @@ Pass Compile Options
115115

116116
You can pass compile options to use intended BLAS/CUDA/Cudnn libraries.
117117
When running cmake command, it will search system paths like
118-
:code:`/usr/lib\:/usr/local/lib` and then search paths that you
118+
:code:`/usr/lib:/usr/local/lib` and then search paths that you
119119
passed to cmake, i.e.
120120

121121
.. code-block:: bash
122122
123123
cmake .. -DWITH_GPU=ON -DWITH_TESTING=OFF -DCUDNN_ROOT=/opt/cudnnv5
124124
125-
**NOTE: These options only take effect when running cmake for the first time, you need to clean the cmake cache or clean the build directory if you want to change it.**
126-
125+
**NOTE: These options only take effect when running cmake for the first time, you need to clean the cmake cache or clean the build directory (** :code:`rm -rf` **) if you want to change it.**
-179 KB
Binary file not shown.

doc/getstarted/build_and_install/docker_install_cn.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
------------------------------
5858

5959
假设您已经在当前目录(比如在/home/work)编写了一个PaddlePaddle的程序 :code:`train.py` (可以参考
60-
`PaddlePaddleBook <http://www.paddlepaddle.org/docs/develop/book/01.fit_a_line/index.cn.html>`_
60+
`PaddlePaddleBook <http://www.paddlepaddle.org/docs/develop/book/01.fit_a_line/index.cn.html>`_
6161
编写),就可以使用下面的命令开始执行训练:
6262

6363
.. code-block:: bash
@@ -77,7 +77,7 @@
7777
cd /work
7878
python train.py
7979
80-
**注:PaddlePaddle Docker镜像为了减小体积,默认没有安装vim,您可以在容器中执行 :code:`apt-get install -y vim` 安装后,在容器中编辑代码。**
80+
**注:PaddlePaddle Docker镜像为了减小体积,默认没有安装vim,您可以在容器中执行** :code:`apt-get install -y vim` **安装后,在容器中编辑代码。**
8181

8282
.. _docker_run_book:
8383

doc/getstarted/build_and_install/docker_install_en.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Launch your training program in Docker
6262

6363
Assume that you have already written a PaddlePaddle program
6464
named :code:`train.py` under directory :code:`/home/work` (refer to
65-
`PaddlePaddleBook <http://www.paddlepaddle.org/docs/develop/book/01.fit_a_line/index.cn.html>`_
65+
`PaddlePaddleBook <http://www.paddlepaddle.org/docs/develop/book/01.fit_a_line/index.cn.html>`_
6666
for more samples), then run the following command:
6767

6868
.. code-block:: bash
@@ -84,7 +84,7 @@ interactively:
8484
cd /work
8585
python train.py
8686
87-
**NOTE: We did not install vim in the default docker image to reduce the image size, you can run :code:`apt-get install -y vim` to install it if you need to edit python files.**
87+
**NOTE: We did not install vim in the default docker image to reduce the image size, you can run** :code:`apt-get install -y vim` **to install it if you need to edit python files.**
8888

8989
.. _docker_run_book:
9090

doc/getstarted/build_and_install/pip_install_cn.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ PaddlePaddle可以使用常用的Python包管理工具
2727
如果需要获取并安装最新的(开发分支)PaddlePaddle,可以从我们的CI系统中下载最新的whl安装包和c-api开发包并安装,
2828
您可以从下面的表格中找到需要的版本:
2929

30+
如果在点击下面链接时出现如下登陆界面,点击“Log in as guest”即可开始下载:
31+
32+
.. image:: paddleci.png
33+
3034
.. csv-table:: 各个版本最新的whl包
3135
:header: "版本说明", "cp27-cp27mu", "cp27-cp27mu", "C-API"
3236
:widths: 1, 3, 3, 3

doc/getstarted/build_and_install/pip_install_en.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ you can download the latest whl package from our CI system. Access
3030
the below links, log in as guest, then click at the "Artifact"
3131
tab, you'll find the download link of whl packages.
3232

33+
If the links below shows up the login form, just click "Log in as guest" to start the download:
34+
35+
.. image:: paddleci.png
36+
3337
.. csv-table:: whl package of each version
3438
:header: "version", "cp27-cp27mu", "cp27-cp27mu", "C-API"
3539
:widths: 1, 3, 3, 3
@@ -46,7 +50,7 @@ Runtime Dependency
4650
------------------------------
4751

4852
PaddlePaddle installation packages (whl) does not only contain .py files,
49-
but also binaries built from C++ code, we ensure that PaddlePaddle can
53+
but also binaries built from C++ code. We ensure that PaddlePaddle can
5054
run on current mainline Linux distributions, like CentOS 6, Ubuntu 14.04
5155
and MacOS 10.12.
5256

doc/getstarted/index_cn.rst

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ PaddlePaddle支持使用pip快速安装,目前支持CentOS 6以上, Ubuntu 14.
3131
快速开始
3232
++++++++
3333

34-
下载 `房价模型文件 <https://raw.githubusercontent.com/PaddlePaddle/book/develop/01.fit_a_line/fit_a_line.tar>`_
35-
36-
创建一个 housing.py 并粘贴此Python代码 (请确保fit_a_line.tar 是在正确的路径上)
34+
创建一个 housing.py 并粘贴此Python代码:
3735

3836
.. code-block:: python
3937
@@ -46,16 +44,14 @@ PaddlePaddle支持使用pip快速安装,目前支持CentOS 6以上, Ubuntu 14.
4644
x = paddle.layer.data(name='x', type=paddle.data_type.dense_vector(13))
4745
y_predict = paddle.layer.fc(input=x, size=1, act=paddle.activation.Linear())
4846
49-
with open('fit_a_line.tar', 'r') as f:
50-
parameters = paddle.parameters.Parameters.from_tar(f)
51-
5247
# Infer using provided test data.
5348
probs = paddle.infer(
54-
output_layer=y_predict, parameters=parameters,
55-
input=[item for item in paddle.dataset.uci_housing.test()()])
49+
output_layer=y_predict,
50+
parameters=paddle.dataset.uci_housing.model(),
51+
input=[item for item in paddle.dataset.uci_housing.test()()])
5652
5753
for i in xrange(len(probs)):
58-
print 'Predicted price: ${:,.2f}'.format(probs[i][0] * 1000)
54+
print 'Predicted price: ${:,.2f}'.format(probs[i][0] * 1000)
5955
6056
执行 :code:`python housing.py` 瞧! 它应该打印出预测住房数据的清单。
6157

doc/getstarted/index_en.rst

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ GET STARTED
66
Quick Install
77
----------------------
88

9-
You can use pip to install PaddlePaddle using a single command, supports
9+
You can use pip to install PaddlePaddle with a single command, supports
1010
CentOS 6 above, Ubuntu 14.04 above or MacOS 10.12, with Python 2.7 installed.
1111
Simply run the following command to install:
1212

@@ -33,11 +33,8 @@ For more details about installation and build:
3333
Quick Start
3434
++++++++
3535

36-
Download the `trained housing prices model <https://raw.githubusercontent.com/PaddlePaddle/book/develop/01.fit_a_line/fit_a_line.tar>`_
37-
38-
Now, create a new file called housing.py, and paste this Python
39-
code (make sure to set the right path based on the location of fit_a_line.tar
40-
on your computer):
36+
Create a new file called housing.py, and paste this Python
37+
code:
4138

4239

4340
.. code-block:: python
@@ -51,16 +48,14 @@ on your computer):
5148
x = paddle.layer.data(name='x', type=paddle.data_type.dense_vector(13))
5249
y_predict = paddle.layer.fc(input=x, size=1, act=paddle.activation.Linear())
5350
54-
with open('fit_a_line.tar', 'r') as f:
55-
parameters = paddle.parameters.Parameters.from_tar(f)
56-
5751
# Infer using provided test data.
5852
probs = paddle.infer(
59-
output_layer=y_predict, parameters=parameters,
60-
input=[item for item in paddle.dataset.uci_housing.test()()])
53+
output_layer=y_predict,
54+
parameters=paddle.dataset.uci_housing.model(),
55+
input=[item for item in paddle.dataset.uci_housing.test()()])
6156
6257
for i in xrange(len(probs)):
63-
print 'Predicted price: ${:,.2f}'.format(probs[i][0] * 1000)
58+
print 'Predicted price: ${:,.2f}'.format(probs[i][0] * 1000)
6459
6560
Run :code:`python housing.py` and voila! It should print out a list of predictions
6661
for the test housing data.

0 commit comments

Comments
 (0)