diff --git a/doc/getstarted/build_and_install/build_from_source_cn.rst b/doc/getstarted/build_and_install/build_from_source_cn.rst index 7e9fec9739943baa579398550d5b2454a7a8a858..b2c92699f5845daf691acd3c46b53da6b820bc5c 100644 --- a/doc/getstarted/build_and_install/build_from_source_cn.rst +++ b/doc/getstarted/build_and_install/build_from_source_cn.rst @@ -103,10 +103,10 @@ PaddlePaddle可以使用cuDNN v5.1之后的任何一个版本来编译运行, 编译选项的设置 ++++++++++++++ -PaddePaddle通过编译时指定路径来实现引用各种BLAS/CUDA/cuDNN库。cmake编译时,首先在系统路径(/usr/lib\:/usr/local/lib)中搜索这几个库,同时也会读取相关路径变量来进行搜索。 通过使用 ``-D`` 命令可以设置,例如 +PaddePaddle通过编译时指定路径来实现引用各种BLAS/CUDA/cuDNN库。cmake编译时,首先在系统路径( :code:`/usr/lib:/usr/local/lib` )中搜索这几个库,同时也会读取相关路径变量来进行搜索。 通过使用 ``-D`` 命令可以设置,例如 .. code-block:: bash cmake .. -DWITH_GPU=ON -DWITH_TESTING=OFF -DCUDNN_ROOT=/opt/cudnnv5 -注意:这几个编译选项的设置,只在第一次cmake的时候有效。如果之后想要重新设置,推荐清理整个编译目录(``rm -rf``)后,再指定。 +**注意:这几个编译选项的设置,只在第一次cmake的时候有效。如果之后想要重新设置,推荐清理整个编译目录(** :code:`rm -rf` )**后,再指定。** diff --git a/doc/getstarted/build_and_install/build_from_source_en.rst b/doc/getstarted/build_and_install/build_from_source_en.rst index 02d5ab3bb81257df50917f04e1409bde6586e4b2..4b998f5288bee33f54f1e4b4c24ce6207323f95a 100644 --- a/doc/getstarted/build_and_install/build_from_source_en.rst +++ b/doc/getstarted/build_and_install/build_from_source_en.rst @@ -115,12 +115,11 @@ Pass Compile Options You can pass compile options to use intended BLAS/CUDA/Cudnn libraries. When running cmake command, it will search system paths like -:code:`/usr/lib\:/usr/local/lib` and then search paths that you +:code:`/usr/lib:/usr/local/lib` and then search paths that you passed to cmake, i.e. .. code-block:: bash cmake .. -DWITH_GPU=ON -DWITH_TESTING=OFF -DCUDNN_ROOT=/opt/cudnnv5 -**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.** - +**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.** diff --git a/doc/getstarted/build_and_install/cmake.png b/doc/getstarted/build_and_install/cmake.png deleted file mode 100644 index a58cd09ad99cf27cc1ca5785fe54d726b83a82f6..0000000000000000000000000000000000000000 Binary files a/doc/getstarted/build_and_install/cmake.png and /dev/null differ diff --git a/doc/getstarted/build_and_install/docker_install_cn.rst b/doc/getstarted/build_and_install/docker_install_cn.rst index 1fb7025915f4019957d354b628908a6d07f629f4..07933b2e0bbca809f6c4e90e7ff8f71d1b3304b2 100644 --- a/doc/getstarted/build_and_install/docker_install_cn.rst +++ b/doc/getstarted/build_and_install/docker_install_cn.rst @@ -57,7 +57,7 @@ ------------------------------ 假设您已经在当前目录(比如在/home/work)编写了一个PaddlePaddle的程序 :code:`train.py` (可以参考 -`PaddlePaddleBook `_ +`PaddlePaddleBook `_ 编写),就可以使用下面的命令开始执行训练: .. code-block:: bash @@ -77,7 +77,7 @@ cd /work python train.py -**注:PaddlePaddle Docker镜像为了减小体积,默认没有安装vim,您可以在容器中执行 :code:`apt-get install -y vim` 安装后,在容器中编辑代码。** +**注:PaddlePaddle Docker镜像为了减小体积,默认没有安装vim,您可以在容器中执行** :code:`apt-get install -y vim` **安装后,在容器中编辑代码。** .. _docker_run_book: diff --git a/doc/getstarted/build_and_install/docker_install_en.rst b/doc/getstarted/build_and_install/docker_install_en.rst index 8cdb0031bd1d16e31745daabd00ade8dda5c7534..9b977c9c72e36b4b47cbf56ae848ab83d9895783 100644 --- a/doc/getstarted/build_and_install/docker_install_en.rst +++ b/doc/getstarted/build_and_install/docker_install_en.rst @@ -62,7 +62,7 @@ Launch your training program in Docker Assume that you have already written a PaddlePaddle program named :code:`train.py` under directory :code:`/home/work` (refer to -`PaddlePaddleBook `_ +`PaddlePaddleBook `_ for more samples), then run the following command: .. code-block:: bash @@ -84,7 +84,7 @@ interactively: cd /work python train.py -**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.** +**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.** .. _docker_run_book: diff --git a/doc/getstarted/build_and_install/pip_install_cn.rst b/doc/getstarted/build_and_install/pip_install_cn.rst index 88c3d89856e879db48ae71e316d15fa8f3a4faef..04c817956c220b2074a354608d7a11502ea6cf67 100644 --- a/doc/getstarted/build_and_install/pip_install_cn.rst +++ b/doc/getstarted/build_and_install/pip_install_cn.rst @@ -27,6 +27,10 @@ PaddlePaddle可以使用常用的Python包管理工具 如果需要获取并安装最新的(开发分支)PaddlePaddle,可以从我们的CI系统中下载最新的whl安装包和c-api开发包并安装, 您可以从下面的表格中找到需要的版本: +如果在点击下面链接时出现如下登陆界面,点击“Log in as guest”即可开始下载: + +.. image:: paddleci.png + .. csv-table:: 各个版本最新的whl包 :header: "版本说明", "cp27-cp27mu", "cp27-cp27mu", "C-API" :widths: 1, 3, 3, 3 diff --git a/doc/getstarted/build_and_install/pip_install_en.rst b/doc/getstarted/build_and_install/pip_install_en.rst index 5d18defd52281c431141b6e0d802e7b9a3712c48..87057f7f9b19b67139584d7fe2f5a2ab71a99e49 100644 --- a/doc/getstarted/build_and_install/pip_install_en.rst +++ b/doc/getstarted/build_and_install/pip_install_en.rst @@ -30,6 +30,10 @@ you can download the latest whl package from our CI system. Access the below links, log in as guest, then click at the "Artifact" tab, you'll find the download link of whl packages. +If the links below shows up the login form, just click "Log in as guest" to start the download: + +.. image:: paddleci.png + .. csv-table:: whl package of each version :header: "version", "cp27-cp27mu", "cp27-cp27mu", "C-API" :widths: 1, 3, 3, 3 @@ -46,7 +50,7 @@ Runtime Dependency ------------------------------ PaddlePaddle installation packages (whl) does not only contain .py files, -but also binaries built from C++ code, we ensure that PaddlePaddle can +but also binaries built from C++ code. We ensure that PaddlePaddle can run on current mainline Linux distributions, like CentOS 6, Ubuntu 14.04 and MacOS 10.12. diff --git a/doc/getstarted/index_cn.rst b/doc/getstarted/index_cn.rst index 660ad578afee4011e81193064c00a3de2bfe6ced..a9087be6f350c5656cabb0c64ba0f200d1c666cc 100644 --- a/doc/getstarted/index_cn.rst +++ b/doc/getstarted/index_cn.rst @@ -31,9 +31,7 @@ PaddlePaddle支持使用pip快速安装,目前支持CentOS 6以上, Ubuntu 14. 快速开始 ++++++++ -下载 `房价模型文件 `_ - -创建一个 housing.py 并粘贴此Python代码 (请确保fit_a_line.tar 是在正确的路径上) +创建一个 housing.py 并粘贴此Python代码: .. code-block:: python @@ -46,16 +44,14 @@ PaddlePaddle支持使用pip快速安装,目前支持CentOS 6以上, Ubuntu 14. x = paddle.layer.data(name='x', type=paddle.data_type.dense_vector(13)) y_predict = paddle.layer.fc(input=x, size=1, act=paddle.activation.Linear()) - with open('fit_a_line.tar', 'r') as f: - parameters = paddle.parameters.Parameters.from_tar(f) - # Infer using provided test data. probs = paddle.infer( - output_layer=y_predict, parameters=parameters, - input=[item for item in paddle.dataset.uci_housing.test()()]) + output_layer=y_predict, + parameters=paddle.dataset.uci_housing.model(), + input=[item for item in paddle.dataset.uci_housing.test()()]) for i in xrange(len(probs)): - print 'Predicted price: ${:,.2f}'.format(probs[i][0] * 1000) + print 'Predicted price: ${:,.2f}'.format(probs[i][0] * 1000) 执行 :code:`python housing.py` 瞧! 它应该打印出预测住房数据的清单。 diff --git a/doc/getstarted/index_en.rst b/doc/getstarted/index_en.rst index 845506cea7da72f6743419180ff34af89e976058..d14e3f5c0cc90792fce9cb82e65da482c44dc433 100644 --- a/doc/getstarted/index_en.rst +++ b/doc/getstarted/index_en.rst @@ -6,7 +6,7 @@ GET STARTED Quick Install ---------------------- -You can use pip to install PaddlePaddle using a single command, supports +You can use pip to install PaddlePaddle with a single command, supports CentOS 6 above, Ubuntu 14.04 above or MacOS 10.12, with Python 2.7 installed. Simply run the following command to install: @@ -33,11 +33,8 @@ For more details about installation and build: Quick Start ++++++++ -Download the `trained housing prices model `_ - -Now, create a new file called housing.py, and paste this Python -code (make sure to set the right path based on the location of fit_a_line.tar -on your computer): +Create a new file called housing.py, and paste this Python +code: .. code-block:: python @@ -51,16 +48,14 @@ on your computer): x = paddle.layer.data(name='x', type=paddle.data_type.dense_vector(13)) y_predict = paddle.layer.fc(input=x, size=1, act=paddle.activation.Linear()) - with open('fit_a_line.tar', 'r') as f: - parameters = paddle.parameters.Parameters.from_tar(f) - # Infer using provided test data. probs = paddle.infer( - output_layer=y_predict, parameters=parameters, - input=[item for item in paddle.dataset.uci_housing.test()()]) + output_layer=y_predict, + parameters=paddle.dataset.uci_housing.model(), + input=[item for item in paddle.dataset.uci_housing.test()()]) for i in xrange(len(probs)): - print 'Predicted price: ${:,.2f}'.format(probs[i][0] * 1000) + print 'Predicted price: ${:,.2f}'.format(probs[i][0] * 1000) Run :code:`python housing.py` and voila! It should print out a list of predictions for the test housing data.