未验证 提交 4f0d0d13 编写于 作者: C Cheerego 提交者: GitHub

Recheck structure&typo&deadlink (#799)

* recheck_structure&fix_typo

* fix_structure

* adjust_dist_structure

* fix_deadlink

* fix deadlink
上级 660dfc5c
.vscode/
/doc/fluid/menu.zh.json
/doc/fluid/menu.en.json
......@@ -46,7 +46,7 @@ API详细使用方法参考 :ref:`cn_api_fluid_ParallelExecutor` ,简单实例
提高通信速度
==========
要减少通信数据量,提高通信速度,主要是使用稀疏更新 ,目前支持 `稀疏更新 <../layers/sparse_update.html>`_ 的主要是 :ref:`cn_api_fluid_layers_embedding` 。
要减少通信数据量,提高通信速度,主要是使用稀疏更新 ,目前支持 :ref:`api_guide_sparse_update` 的主要是 :ref:`cn_api_fluid_layers_embedding` 。
.. code-block:: python
......
......@@ -3,7 +3,7 @@
#########
.. toctree::
:hidden:
:maxdepth: 1
cpu_train_best_practice.rst
dist_training_gpu.rst
......@@ -8,7 +8,7 @@
## 测试对象
**PaddlePaddle, Pytorch, Tensorflow**
- 在测试中,PaddlePaddle使用子图优化的方式集成了TensorRT, 模型[地址](https://github.com/PaddlePaddle/models/tree/develop/fluid/PaddleCV/image_classification/models)
- 在测试中,PaddlePaddle使用子图优化的方式集成了TensorRT, 模型[地址](https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/image_classification/models)
- Pytorch使用了原生的实现, 模型[地址1](https://github.com/pytorch/vision/tree/master/torchvision/models)[地址2](https://github.com/marvis/pytorch-mobilenet)
- 对TensorFlow测试包括了对TF的原生的测试,和对TF—TRT的测试,**对TF—TRT的测试并没有达到预期的效果,后期会对其进行补充**, 模型[地址](https://github.com/tensorflow/models)
......
......@@ -359,5 +359,5 @@ Fluid使用Executor.run来运行一段Program。
[6.099215 ]], dtype=float32), array([1.6935859], dtype=float32)]
```
至此您已经了解了Fluid 内部的执行流程的核心概念,更多框架使用细节请参考[使用指南](../../user_guides/index.html)相关内容,[模型库](../../user_guides/models/index_cn.html
至此您已经了解了Fluid 内部的执行流程的核心概念,更多框架使用细节请参考[使用指南](../../user_guides/index_cn.html)相关内容,[模型库](../../user_guides/models/index_cn.html
)中也为您提供了丰富的模型示例以供参考。
# Github提交PR指南
# 提交PR注意事项
## 建立 Issue 并完成 Pull Request
......
#############
新增Operator
新增OP
#############
本部分将指导您如何新增Operator,也包括一些必要的注意事项
......
# 如何写新的op
# 如何写新的OP
## 概念简介
......
# op相关注意事项
# OP相关注意事项
## Fluid中Op的构建逻辑
### 1.Fluid中Op的构建逻辑
......
......@@ -11,7 +11,7 @@ The Fluid framework is designed to run on a variety of devices and third-party l
Operator inheritance diagram:
![op_inheritance_relation_diagram](../../pics/op_inheritance_relation_diagram.png)
For further information, please refer to: [multi_devices](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/design/multi_devices) , [scope](https://github.com/PaddlePaddle/FluidDoc/Blob/develop/doc/fluid/design/concepts/scope.md) , [Developer's_Guide_to_Paddle_Fluid](https://github.com/PaddlePaddle/FluidDoc/blob/release/1.2/doc/fluid/getstarted/Developer's_Guide_to_Paddle_Fluid.md)
For further information, please refer to: [multi_devices](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/design/multi_devices) , [scope](https://github.com/PaddlePaddle/FluidDoc/blob/develop/doc/fluid/design/concepts/scope.md) , [Developer's_Guide_to_Paddle_Fluid](https://github.com/PaddlePaddle/FluidDoc/blob/release/1.2/doc/fluid/getstarted/Developer's_Guide_to_Paddle_Fluid.md)
### 2.Op's registration logic
The registration entries for each Operator include:
......
......@@ -2,18 +2,20 @@
进阶使用
########
.. todo::
如果您非常熟悉 Fluid,期望获得更高效的模型或者定义自己的Operator,请阅读:
- `Fluid 设计思想 <../advanced_usage/design_idea/fluid_design_idea.html>`_:介绍 Fluid 底层的设计思想,帮助您更好的理解框架运作过程
- `预测部署 <../advanced_usage/deploy/index_cn.html>`_ :介绍如何应用训练好的模型进行预测
- `新增operator <../advanced_usage/development/new_op/index_cn.html>`_ :介绍新增operator的方法及注意事项
- `新增OP <../advanced_usage/development/new_op/index_cn.html>`_ :介绍新增operator的方法及注意事项
- `性能调优 <../advanced_usage/development/profiling/index_cn.html>`_ :介绍 Fluid 使用过程中的调优方法
- `最佳实践 <../advanced_usage/best_practice/index_cn.html>`_
- `模型压缩工具库 <../advanced_usage/paddle_slim/paddle_slim.html>`_
非常欢迎您为我们的开源社区做出贡献,关于如何贡献您的代码或文档,请阅读:
- `如何贡献代码 <../advanced_usage/development/contribute_to_paddle/index_cn.html>`_:介绍如何向 PaddlePaddle 开源社区贡献代码
......@@ -27,7 +29,7 @@
deploy/index_cn.rst
development/new_op/index_cn.rst
development/profiling/index_cn.rst
development/contribute_to_paddle/index_cn.rst
development/write_docs_cn.md
best_practice/index_cn.rst
paddle_slim/paddle_slim.md
development/contribute_to_paddle/index_cn.rst
development/write_docs_cn.md
......@@ -133,7 +133,7 @@ Data Reader Interface
iterable = data_reader()
从iterable生成的元素应该是单个数据条目,而不是mini batch。数据输入可以是单个项目,也可以是项目的元组,但应为 `支持的类型 <http://www.paddlepaddle.org/doc/ui/data_provider/pydataprovider2.html?highlight=dense_vector#input-types>`_ (如, numpy 1d array of float32, int, list of int)
从iterable生成的元素应该是单个数据条目,而不是mini batch。数据输入可以是单个项目,也可以是项目的元组,但应为 `支持的类型 <../../user_guides/howto/prepare_data/feeding_data.html#fluid>`_ (如, numpy 1d array of float32, int, list of int)
单项目数据读取器创建者的示例实现:
......
......@@ -5,12 +5,13 @@ API
.. toctree::
:maxdepth: 1
../api_guides/index.rst
../api_guides/index_cn.rst
fluid_cn.rst
average_cn.rst
backward_cn.rst
clip_cn.rst
data_feeder_cn.rst
dataset_cn.rst
executor_cn.rst
initializer_cn.rst
io_cn.rst
......@@ -21,6 +22,5 @@ API
profiler_cn.rst
regularizer_cn.rst
transpiler_cn.rst
dataset_cn.rst
data/dataset_cn.rst
data/data_reader_cn.rst
......@@ -12,7 +12,7 @@ cuda_profiler
.. py:function:: paddle.fluid.profiler.cuda_profiler(output_file, output_mode=None, config=None)
CUDA分析器。通过CUDA运行时应用程序编程接口对CUDA程序进行性能分析。分析结果将以键-值对格式或逗号分隔的格式写入output_file。用户可以通过output_mode参数设置输出模式,并通过配置参数设置计数器/选项。默认配置是[' gpustarttimestamp ', ' gpustarttimestamp ', ' gridsize3d ', ' threadblocksize ', ' streamid ', ' enableonstart 0 ', ' conckerneltrace ']。然后,用户可使用 `NVIDIA Visual Profiler <https://developer.nvidia.com/nvidia-visualprofiler>`_ 工具来加载这个输出文件以可视化结果。
CUDA分析器。通过CUDA运行时应用程序编程接口对CUDA程序进行性能分析。分析结果将以键-值对格式或逗号分隔的格式写入output_file。用户可以通过output_mode参数设置输出模式,并通过配置参数设置计数器/选项。默认配置是[' gpustarttimestamp ', ' gpustarttimestamp ', ' gridsize3d ', ' threadblocksize ', ' streamid ', ' enableonstart 0 ', ' conckerneltrace ']。然后,用户可使用 `NVIDIA Visual Profiler <https://developer.nvidia.com/nvidia-visual-profiler>`_ 工具来加载这个输出文件以可视化结果。
参数:
......@@ -67,7 +67,7 @@ profiler
profile interface 。与cuda_profiler不同,此profiler可用于分析CPU和GPU程序。默认情况下,它记录CPU和GPU kernel,如果想分析其他程序,可以参考教程来在c++代码中添加更多代码。
如果 state== ' All ',在profile_path 中写入文件 profile proto 。该文件记录执行期间的时间顺序信息。然后用户可以看到这个文件的时间轴,请参考 `https://github.com/PaddlePaddle/Paddle/blob/develop/doc/fluid/howto/optimization/timeline.md <https://github.com/PaddlePaddle/Paddle/blob/develop/doc/fluid/howto/optimization/timeline.md>`_
如果 state== ' All ',在profile_path 中写入文件 profile proto 。该文件记录执行期间的时间顺序信息。然后用户可以看到这个文件的时间轴,请参考 `这里 <../advanced_usage/development/profiling/timeline_cn.html>`_
参数:
- **state** (string) – profiling state, 取值为 'CPU' 或 'GPU', profiler 使用 CPU timer 或GPU timer 进行 profiling. 虽然用户可能在开始时指定了执行位置(CPUPlace/CUDAPlace),但是为了灵活性,profiler不会使用这个位置。
......@@ -136,7 +136,7 @@ start_profiler
不能使用 ``fluid.profiler.profiler``
如果 state== ' All ',在profile_path 中写入文件 profile proto 。该文件记录执行期间的时间顺序信息。然后用户可以看到这个文件的时间轴,请参考 `https://github.com/PaddlePaddle/Paddle/blob/develop/doc/fluid/howto/optimization/timeline.md <https://github.com/PaddlePaddle/Paddle/blob/develop/doc/fluid/howto/optimization/timeline.md>`_
如果 state== ' All ',在profile_path 中写入文件 profile proto 。该文件记录执行期间的时间顺序信息。然后用户可以看到这个文件的时间轴,请参考 `这里 <../advanced_usage/development/profiling/timeline_cn.html>`_
参数:
- **state** (string) – profiling state, 取值为 'CPU' 或 'GPU' 或 'All', 'CPU' 代表只分析 cpu. 'GPU' 代表只分析 GPU . 'All' 会产生 timeline.
......
===========
API快速检索
API分类检索
===========
API快速检索分功能向您介绍PaddlePaddle Fluid的API体系和用法,帮助您快速了解PaddlePaddle Fluid API的全貌,包括以下几个模块:
本模块分功能向您介绍PaddlePaddle Fluid的API体系和用法,提高您的查找效率,帮助您快速了解PaddlePaddle Fluid API的全貌,包括以下几个模块:
.. toctree::
:maxdepth: 1
......@@ -18,5 +18,6 @@ API快速检索分功能向您介绍PaddlePaddle Fluid的API体系和用法,
low_level/memory_optimize.rst
low_level/executor.rst
low_level/parallel_executor.rst
low_level/compiled_program.rst
low_level/parameter.rst
low_level/distributed/index.rst
......@@ -18,5 +18,6 @@ This section introduces the Fluid API structure and usage, to help you quickly g
low_level/memory_optimize_en.rst
low_level/executor_en.rst
low_level/parallel_executor_en.rst
low_level/compiled_program_en.rst
low_level/parameter_en.rst
low_level/distributed/index_en.rst
......@@ -4,7 +4,7 @@
分布式异步训练
############
Fluid支持数据并行的分布式异步训练,API使用 :code:`DistributedTranspiler` 将单机网络配置转换成可以多机执行的
Fluid支持数据并行的分布式异步训练,API使用 :code:`DistributeTranspiler` 将单机网络配置转换成可以多机执行的
:code:`pserver` 端程序和 :code:`trainer` 端程序。用户在不同的节点执行相同的一段代码,根据环境变量或启动参数,
可以执行对应的 :code:`pserver` 或 :code:`trainer` 角色。Fluid异步训练只支持pserver模式,异步训练和 `同步训练 <../distributed/sync_training.html>`_ 的主要差异在于:异步训练每个trainer的梯度是单独更新到参数上的,
而同步训练是所有trainer的梯度合并之后统一更新到参数上,因此,同步训练和异步训练的超参数需要分别调节。
......@@ -16,10 +16,10 @@ API详细使用方法参考 :ref:`cn_api_fluid_DistributeTranspiler` ,简单
.. code-block:: python
config = fluid.DistributedTranspilerConfig()
config = fluid.DistributeTranspilerConfig()
# 配置策略config
config.slice_var_up = False
t = fluid.DistributedTranspiler(config=config)
t = fluid.DistributeTranspiler(config=config)
t.transpile(trainer_id,
program=main_program,
pservers="192.168.0.1:6174,192.168.0.2:6174",
......
......@@ -4,11 +4,11 @@
执行引擎
##########
:code:`Executor` 实现了一个简易的执行器,所有的操作在其中顺序执行。你可以在Python脚本中运行:code:`Executor`。PaddlePaddle Fluid中有两种执行器。一种是:code:`Executor` 默认的单线程执行器,另一种是并行计算执行器,在:ref:`api_guide_parallel_executor`中进行了解释。`Executor`和:ref:`api_guide_parallel_executor`的配置不同,这可能会给部分用户带来困惑。为使执行器更加灵活,我们引入了:ref:`api_guide_compiled_program`,:ref:`api_guide_compiled_program`用于把一个程序转换为不同的优化组合,可以通过:code:`Executor`运行。
:code:`Executor` 实现了一个简易的执行器,所有的操作在其中顺序执行。你可以在Python脚本中运行 :code:`Executor` 。PaddlePaddle Fluid中有两种执行器。一种是 :code:`Executor` 默认的单线程执行器,另一种是并行计算执行器,在 :ref:`api_guide_parallel_executor` 中进行了解释。``Executor`` 和 :ref:`api_guide_parallel_executor` 的配置不同,这可能会给部分用户带来困惑。为使执行器更加灵活,我们引入了 :ref:`api_guide_compiled_program` , :ref:`api_guide_compiled_program` 用于把一个程序转换为不同的优化组合,可以通过 :code:`Executor` 运行。
:code:`Executor`的逻辑非常简单。建议在调试阶段用:code:`Executor`在一台计算机上完整地运行模型,然后转向多设备或多台计算机计算。
:code:`Executor` 的逻辑非常简单。建议在调试阶段用 :code:`Executor` 在一台计算机上完整地运行模型,然后转向多设备或多台计算机计算。
:code:`Executor`在构造时接受一个:code:`Place`,它既可能是:ref:`api_fluid_CPUPlace`也可能是:ref:`api_fluid_CUDAPlace`
:code:`Executor` 在构造时接受一个 :code:`Place` ,它既可能是 :ref:`api_fluid_CPUPlace` 也可能是 :ref:`api_fluid_CUDAPlace`
.. code-block:: python
# 首先创建Executor。
......@@ -21,7 +21,7 @@
loss, = exe.run(fluid.default_main_program(),
feed=feed_dict,
fetch_list=[loss.name])
简单样例请参照 `quick_start_fit_a_line <http://paddlepaddle.org/documentation/docs/zh/1.1/beginners_guide/quick_start/fit_a_line/README.html>`_
简单样例请参照 `basics_fit_a_line <../../beginners_guide/basics/fit_a_line/README.cn.html>`_
- 相关API :
- :ref:`cn_api_fluid_Executor`
......@@ -25,7 +25,7 @@ The logic of :code:`Executor` is very simple. It is suggested to thoroughly run
fetch_list=[loss.name])
For simple example please refer to `quick_start_fit_a_line <http://paddlepaddle.org/documentation/docs/zh/1.1/beginners_guide/quick_start/fit_a_line/README.html>`_
For simple example please refer to `basics_fit_a_line <../../beginners_guide/basics/fit_a_line/README.html>`_
- Related API :
- :ref:`api_fluid_Executor`
......
......@@ -32,7 +32,8 @@
对于depthwise convolution,可以设置groups等于输入通道数,此时,2D卷积的卷积核形状为[C_o, 1, f_h, f_w]。
对于pointwise convolution,卷积核的形状为[C_o, C_in, 1, 1]。
**注意**:Fluid针对depthwise convolution的GPU计算做了高度优化,您可以通过在 :code:`fluid.layers.conv2d`接口设置 :code:`use_cudnn=False`来使用Fluid自身优化的CUDA程序。
**注意**:Fluid针对depthwise convolution的GPU计算做了高度优化,您可以通过在
:code:`fluid.layers.conv2d` 接口设置 :code:`use_cudnn=False` 来使用Fluid自身优化的CUDA程序。
- 空洞卷积(dilated convolution):
......
......@@ -37,9 +37,9 @@ API详细使用方法参考 :ref:`cn_api_fluid_layers_embedding` ,以下是一
以上参数中:
- :code:`is_sparse` : 反向计算的时候梯度是否为sparse tensor。如果不设置,梯度是一个 `LodTensor <https://github.com/PaddlePaddle/FluidDoc/blob/develop/doc/fluid/user_guides/howto/prepare_data/lod_tensor.md>`_ 。默认为False。
- :code:`is_sparse` : 反向计算的时候梯度是否为sparse tensor。如果不设置,梯度是一个 `LodTensor <https://github.com/PaddlePaddle/FluidDoc/blob/develop/doc/fluid/user_guides/howto/basic_concept/lod_tensor.html>`_ 。默认为False。
- :code:`is_distributed` : 标志是否是用在分布式的场景下。一般大规模稀疏更新(embedding的第0维维度很大,比如几百万以上)才需要设置。具体可以参考大规模稀疏的API guide :ref:`api_guide_async_training` 。默认为False。
- :code:`is_distributed` : 标志是否是用在分布式的场景下。一般大规模稀疏更新(embedding的第0维维度很大,比如几百万以上)才需要设置。具体可以参考大规模稀疏的API guide :ref:`cn_api_guide_async_training` 。默认为False。
- API汇总:
- :ref:`cn_api_fluid_layers_embedding`
......@@ -37,7 +37,7 @@ API reference :ref:`api_fluid_layers_embedding` . Here is a simple example:
The parameters:
- :code:`is_sparse` : Whether the gradient is a sparse tensor in the backward calculation. If not set, the gradient is a `LodTensor <https://github.com/PaddlePaddle/FluidDoc/blob/develop/doc/fluid/user_guides/howto/prepare_data/lod_tensor.md>`_ . The default is False.
- :code:`is_sparse` : Whether the gradient is a sparse tensor in the backward calculation. If not set, the gradient is a `LodTensor <https://github.com/PaddlePaddle/FluidDoc/blob/develop/doc/fluid/user_guides/howto/basic_concept/lod_tensor_en.html>`_ . The default is False.
- :code:`is_distributed` : Whether the current training is in a distributed scenario. Generally, this parameter can only be set in large-scale sparse updates (the 0th dimension of embedding is very large, such as several million or more). For details, please refer to the large-scale sparse API guide :ref:`api_guide_async_training`. The default is False.
......
......@@ -33,8 +33,9 @@ API Reference 请参考 :ref:`cn_api_fluid_nets_img_conv_group`
:code:`sequence_conv_pool` 是由 :ref:`cn_api_fluid_layers_sequence_conv` 与 :ref:`cn_api_fluid_layers_sequence_pool` 串联而成。
该模块在 `自然语言处理 <https://zh.wikipedia.org/wiki/自然语言处理>`_ 以及 `语音识别 <https://zh.wikipedia.org/wiki/语音识别>`_ 等领域均有广泛应用,
比如 `文本分类模型 <https://github.com/PaddlePaddle/models/blob/develop/fluid/PaddleNLP/text_classification/nets.py>`_ ,
`TagSpace <https://github.com/PaddlePaddle/models/blob/develop/fluid/PaddleRec/tagspace/train.py>`_ 以及 `Multi-view Simnet <https://github.com/PaddlePaddle/models/blob/develop/fluid/PaddleRec/multiview_simnet/nets.py>`_ 等模型。
比如 `文本分类模型 <https://github.com/PaddlePaddle/models/blob/develop/PaddleNLP/text_classification/nets.py>`_ ,
`TagSpace <https://github.com/PaddlePaddle/models/blob/develop/PaddleRec/tagspace/train.py>`_ 以及
`Multi-view Simnet <https://github.com/PaddlePaddle/models/blob/develop/PaddleRec/multiview_simnet/nets.py>`_ 等模型。
API Reference 请参考 :ref:`cn_api_fluid_nets_sequence_conv_pool`
......@@ -55,7 +56,7 @@ API Reference 请参考 :ref:`cn_api_fluid_nets_glu`
.. math::
Attention(Q, K, V)= softmax(QK^\mathrm{T})V
该模块广泛使用在 `机器翻译 <https://zh.wikipedia.org/zh/机器翻译>`_ 的模型中,比如 `Transformer <https://github.com/PaddlePaddle/models/tree/develop/fluid/PaddleNLP/neural_machine_translation/transformer>`_ 。
该模块广泛使用在 `机器翻译 <https://zh.wikipedia.org/zh/机器翻译>`_ 的模型中,比如 `Transformer <https://github.com/PaddlePaddle/models/tree/develop/PaddleNLP/neural_machine_translation/transformer>`_ 。
API Reference 请参考 :ref:`cn_api_fluid_nets_scaled_dot_product_attention`
......@@ -32,8 +32,8 @@ For API Reference, please refer to :ref:`api_fluid_nets_img_conv_group`
--------------------
:code:`sequence_conv_pool` is got by concatenating :ref:`api_fluid_layers_sequence_conv` with :ref:`api_fluid_layers_sequence_pool`.
The module is widely used in the field of `natural language processing <https://en.wikipedia.org/wiki/Natural_language_processing>`_ and `speech recognition <https://en.wikipedia.org/wiki/Speech_recognition>`_ . Models such as the `text classification model <https://github.com/PaddlePaddle/models/blob/develop/fluid/PaddleNLP/text_classification/nets.py>`_ ,
`TagSpace <https://github.com/PaddlePaddle/models/blob/develop/fluid/PaddleRec/tagspace/train.py>`_ and `Multi view Simnet <https://github.com/PaddlePaddle/models/blob/develop/fluid/PaddleRec/multiview_simnet/nets.py>`_.
The module is widely used in the field of `natural language processing <https://en.wikipedia.org/wiki/Natural_language_processing>`_ and `speech recognition <https://en.wikipedia.org/wiki/Speech_recognition>`_ . Models such as the `text classification model <https://github.com/PaddlePaddle/models/blob/develop/PaddleNLP/text_classification/nets.py>`_ ,
`TagSpace <https://github.com/PaddlePaddle/models/blob/develop/PaddleRec/tagspace/train.py>`_ and `Multi view Simnet <https://github.com/PaddlePaddle/models/blob/develop/PaddleRec/multiview_simnet/nets.py>`_.
For API Reference, please refer to :ref:`api_fluid_nets_sequence_conv_pool`
......@@ -54,6 +54,6 @@ For the input data :code:`Queries` , :code:`Key` and :code:`Values`, calculate t
.. math::
Attention(Q, K, V)= softmax(QK^\mathrm{T})V
This module is widely used in the model of `machine translation <https://en.wikipedia.org/wiki/Machine_translation>`_, such as `Transformer <https://github.com/PaddlePaddle/models/tree/develop/Fluid/PaddleNLP/neural_machine_translation/transformer>`_ .
This module is widely used in the model of `machine translation <https://en.wikipedia.org/wiki/Machine_translation>`_, such as `Transformer <https://github.com/PaddlePaddle/models/tree/develop/PaddleNLP/neural_machine_translation/transformer>`_ .
For API Reference, please refer to :ref:`api_fluid_nets_scaled_dot_product_attention`
......@@ -29,7 +29,7 @@
**注意** :如果在Reduce模式下使用 :code:`CPU` 多线程执行 :code:`Program` , :code:`Program` 的参数在多个线程间是共享的,在某些模型上,Reduce模式可以大幅节省内存。
鉴于模型的执行速率和模型结构及执行器的执行策略有关,:code:`ParallelExecutor` 允许你修改执行器的相关参数,例如线程池的规模( :code:`num_threads` )、为清除临时变量:code:`num_iteration_per_drop_scope`需要进行的循环次数。更多信息请参照:ref:`cn_api_fluid_ExecutionStrategy`
鉴于模型的执行速率和模型结构及执行器的执行策略有关,:code:`ParallelExecutor` 允许你修改执行器的相关参数,例如线程池的规模( :code:`num_threads` )、为清除临时变量 :code:`num_iteration_per_drop_scope` 需要进行的循环次数。更多信息请参照 :ref:`cn_api_fluid_ExecutionStrategy`
.. code-block:: python
......
################
深度学习基础
深度学习基础教程
################
本章由7篇文档组成,它们按照简单到难的顺序排列,将指导您如何使用PaddlePaddle完成基础的深度学习任务
本章由9篇文档组成,它们按照简单到难的顺序排列,将指导您如何使用PaddlePaddle完成基础的深度学习任务
本章文档涉及大量了深度学习基础知识,也介绍了如何使用PaddlePaddle实现这些内容,请参阅以下说明了解如何使用:
......@@ -15,6 +15,8 @@
.. toctree::
:titlesonly:
fit_a_line/README.cn.md
recognize_digits/README.cn.md
image_classification/index.md
word2vec/index.md
recommender_system/index.md
......
##########################
############################
Basic Deep Learning Models
##########################
############################
This section collects six documents arranging from the simplest to the most challenging, which will guide you through the basic deep learning tasks in PaddlePaddle.
This section collects 8 documents arranging from the simplest to the most challenging, which will guide you through the basic deep learning tasks in PaddlePaddle.
The documentation in this chapter covers a lot of deep learning basics and how to implement them with PaddlePaddle. See the instructions below for how to use:
......@@ -15,6 +15,8 @@ The book you are reading is an "interactive" e-book - each chapter can be run in
.. toctree::
:titlesonly:
fit_a_line/README.md
recognize_digits/README.md
image_classification/index_en.md
word2vec/index_en.md
recommender_system/index_en.md
......
......@@ -6,23 +6,24 @@ PaddlePaddle (PArallel Distributed Deep LEarning)是一个易用、高效、灵
您可参考PaddlePaddle的 `Github <https://github.com/PaddlePaddle/Paddle>`_ 了解详情,也可阅读 `版本说明 <../release_note.html>`_ 了解新版本的特性
当您第一次来到PaddlePaddle,请您首先阅读以下文档,了解安装方法
让我们从这里开始
- `安装说明 <../beginners_guide/install/index_cn.html>`_:我们支持在Ubuntu/CentOS/Windows/MacOS环境上的安装
- `快速开始 <../beginners_guide/quick_start.html>`_
如果您已经具备一定的深度学习基础,第一次使用PaddlePaddle时,可以跟随下列简单的模型案例供您快速上手
当您第一次来到PaddlePaddle,请您首先阅读以下文档,了解安装方法
- `Fluid编程指南 <../beginners_guide/programming_guide/programming_guide.html>`_:介绍 Fluid 的基本概念和使用方法
- `安装说明 <../beginners_guide/install/index_cn.html>`_:我们支持在Ubuntu/CentOS/Windows/MacOS环境上的安装
- `快速入门 <../beginners_guide/quick_start/index.html>`_:提供线性回归和识别数字两个入门级模型,帮助您快速上手训练网络
这里为您提供了更多学习资料:
- `深度学习基础 <../beginners_guide/basics/index.html>`_:覆盖图像分类、个性化推荐、机器翻译等多个深度领域的基础知识,提供 Fluid 实现案例
- `Fluid编程指南 <../beginners_guide/programming_guide/programming_guide.html>`_:介绍 Fluid 的基本概念和使用方法
.. toctree::
:hidden:
quick_start_cn.rst
install/index_cn.rst
quick_start/index.rst
basics/index.rst
basics/index_cn.rst
programming_guide/programming_guide.md
......@@ -15,8 +15,6 @@ If you have been armed with certain level of deep learning knowledge, and it hap
- `Programming with Fluid <../beginners_guide/programming_guide/programming_guide_en.html>`_ : Core concepts and basic usage of Fluid
- `Quick Start <../beginners_guide/quick_start/index_en.html>`_: Two easy-to-go models, linear regression model and digit recognition model, are in place to speed up your study of training neural networks
- `Deep Learning Basics <../beginners_guide/basics/index_en.html>`_: This section encompasses various fields of fundamental deep learning knowledge, such as image classification, customized recommendation, machine translation, and examples implemented by Fluid are provided.
......@@ -24,6 +22,5 @@ If you have been armed with certain level of deep learning knowledge, and it hap
:hidden:
install/index_en.rst
quick_start/index_en.rst
basics/index_en.rst
programming_guide/programming_guide_en.md
......@@ -68,7 +68,7 @@ Once you have **properly installed Docker**, you can start **compiling PaddlePad
9. Execute cmake:
> For details on the compilation options, see the [compilation options table](../Tables.html/#Compile).
> For details on the compilation options, see the [compilation options table](../Tables_en.html/#Compile).
* For users who need to compile the **CPU version PaddlePaddle**:
......
......@@ -4,7 +4,7 @@
This instruction describes how to install PaddlePaddle on a *64-bit desktop or laptop* and Ubuntu system. The Ubuntu systems we support must meet the following requirements:
Please note: Attempts on other systems may cause the installation to fail. Please ensure that your environment meets the conditions. The installation we provide by default requires your computer processor to support the AVX instruction set. Otherwise, please select the version of `no_avx` in the [latest Release installation package list](./Tables.html/#ciwhls-release).
Please note: Attempts on other systems may cause the installation to fail. Please ensure that your environment meets the conditions. The installation we provide by default requires your computer processor to support the AVX instruction set. Otherwise, please select the version of `no_avx` in the [latest Release installation package list](./Tables_en.html/#ciwhls-release).
Under Ubuntu, you can use `cat /proc/cpuinfo | grep avx` to check if your processor supports the AVX instruction set.
......
......@@ -407,17 +407,17 @@ outs = exe.run(
```
可以看到100次迭代后,预测值已经非常接近真实值了,损失值也从初始值9.05下降到了0.01。
恭喜您!已经成功完成了第一个简单网络的搭建,想尝试线性回归的进阶版——房价预测模型,请阅读:[线性回归](../../beginners_guide/quick_start/fit_a_line/README.cn.html)。更多丰富的模型实例可以在[模型库](../../user_guides/models/index_cn.html)中找到。
恭喜您!已经成功完成了第一个简单网络的搭建,想尝试线性回归的进阶版——房价预测模型,请阅读:[线性回归](../../beginners_guide/basics/fit_a_line/README.cn.html)。更多丰富的模型实例可以在[模型库](../../user_guides/models/index_cn.html)中找到。
<a name="what_next"></a>
## What's next
如果您已经掌握了基本操作,可以进行下一阶段的学习了:
跟随这一教程将学习到如何对实际问题建模并使用fluid构建模型:[配置简单的网络](../../user_guides/howto/configure_simple_model/index.html)
跟随这一教程将学习到如何对实际问题建模并使用fluid构建模型:[配置简单的网络](../../user_guides/howto/configure_simple_model/index_cn.html)
完成网络搭建后,可以开始在单机或多机上训练您的网络了,详细步骤请参考[训练神经网络](../../user_guides/howto/training/index.html)
完成网络搭建后,可以开始在单机或多机上训练您的网络了,详细步骤请参考[训练神经网络](../../user_guides/howto/training/index_cn.html)
除此之外,使用文档模块根据开发者的不同背景划分了三个学习阶段:[新手入门](../../beginners_guide/index.html)[使用指南](../../user_guides/index.html)[进阶使用](../../advanced_usage/index.html)
除此之外,使用文档模块根据开发者的不同背景划分了三个学习阶段:[新手入门](../../beginners_guide/index_cn.html)[使用指南](../../user_guides/index_cn.html)[进阶使用](../../advanced_usage/index_cn.html)
如果您希望阅读更多场景下的应用案例,可以跟随导航栏进入[快速入门](../../beginners_guide/quick_start/index.html)[深度学习基础知识](../../beginners_guide/basics/index.html)。已经具备深度学习基础知识的用户,可以从[使用指南](../../user_guides/index.html)开始阅读。
如果您希望阅读更多场景下的应用案例,可以参考[深度学习基础教程](../../beginners_guide/basics/index_cn.html)。已经具备深度学习基础知识的用户,可以从[使用指南](../../user_guides/index_cn.html)开始阅读。
......@@ -414,7 +414,7 @@ Firstly, define input data format, model structure,loss function and optimized a
```
Now we discover that predicted value is nearly close to real value and the loss value descends from original value 9.05 to 0.01 after iteration for 100 times.
Congratulations! You have succeed to create a simple network. If you want to try advanced linear regression —— predict model of housing price, please read [linear regression](../../beginners_guide/quick_start/fit_a_line/README.en.html). More examples of model can be found in [models](../../user_guides/models/index_en.html).
Congratulations! You have succeed to create a simple network. If you want to try advanced linear regression —— predict model of housing price, please read [linear regression](../../beginners_guide/basics/fit_a_line/README.en.html). More examples of model can be found in [models](../../user_guides/models/index_en.html).
<a name="what_next"></a>
## What's next
......@@ -427,4 +427,4 @@ After the construction of network, you can start training your network in single
In addition, there are three learning levels in documentation according to developer's background and experience: [Beginner's Guide](../../beginners_guide/index_en.html) , [User Guides](../../user_guides/index_en.html) and [Advanced User Guides](../../advanced_usage/index_en.html).
If you want to read examples in more application scenarios, you can go to [quick start](../../beginners_guide/quick_start/index_en.html) and [basic knowledge of deep learning](../../beginners_guide/basics/index_en.html) .If you have learned basic knowledge of deep learning, you can read from [user guide](../../user_guides/index_en.html).
If you want to read examples in more application scenarios, you can go to [basic knowledge of deep learning](../../beginners_guide/basics/index_en.html) .If you have learned basic knowledge of deep learning, you can read from [user guide](../../user_guides/index_en.html).
########
快速入门
########
欢迎来到快速入门部分,在这里,我们将向您介绍如何通过PaddlePaddle Fluid实现经典的线性回归和手写识别的模型,以下两篇文档将指导您使用真实数据集搭建起模型、进行训练和预测:
.. toctree::
:titlesonly:
fit_a_line/README.cn.md
recognize_digits/README.cn.md
##############
Quick Start
##############
Welcome to Quick Start!
This section will tutor you to invent your won models of classical *linear Regression* and *Handwritten Digits Recognition* tasks in PaddlePaddle Fluid. The following tutorials provide details on model definition, training, and inference in a friendly manner based on real-life datasets:
.. toctree::
:titlesonly:
fit_a_line/README.md
recognize_digits/README.md
......@@ -11,8 +11,8 @@
:maxdepth: 1
beginners_guide/index.rst
user_guides/index.rst
advanced_usage/index.rst
beginners_guide/index_cn.rst
user_guides/index_cn.rst
advanced_usage/index_cn.rst
api_cn/index_cn.rst
release_note.rst
release_note_cn.rst
.. _deploy_ctr_on_baidu_cloud_cn:
百度云分布式训练CTR
百度云分布式训练CTR
=========================
Fluid支持数据并行的分布式训练,也支持基于Kubernetes的分布式部署。本文以百度云为例,说明如何通过在云服务器上分布式训练Click-Through-Rate(以下简称ctr)任务。
......
......@@ -7,6 +7,6 @@ PaddlePaddle Fluid支持单机训练和多节点训练。每种训练模式下
.. toctree::
:maxdepth: 1
single_node
multi_node
save_load_variables
single_node.rst
multi_node.rst
save_load_variables.rst
......@@ -8,3 +8,4 @@
cluster_quick_start.rst
cluster_howto.rst
train_on_baidu_cloud_cn.rst
deploy_ctr_on_baidu_cloud_cn.rst
.. _user_guide_save_load_vars:
##################
模型/变量的保存载入与增量训练
##################
#############################
模型/变量的保存/载入与增量训练
#############################
模型变量分类
############
......
......@@ -77,7 +77,7 @@
多卡训练
#######################
在多卡训练中,你可以使用:code:`fluid.compiler.CompiledProgram`来编译:code:`fluid.Program`,然后调用:code:`with_data_parallel`。例如:
在多卡训练中,你可以使用 :code:`fluid.compiler.CompiledProgram` 来编译 :code:`fluid.Program` ,然后调用 :code:`with_data_parallel` 。例如:
.. code-block:: python
......@@ -93,9 +93,9 @@
注释:
1. :ref:`cn_api_fluid_CompiledProgram`的构造函数需要经过:code:`fluid.Program`设置后运行,这在运行时内无法被修改。
2. 如果:code:`exe`是用CUDAPlace来初始化的,模型会在GPU中运行。在显卡训练模式中,所有的显卡都将被占用。用户可以配置 `CUDA_VISIBLE_DEVICES <http://www.acceleware.com/blog/cudavisibledevices-masking-gpus>`_ 以更改被占用的显卡。
3. 如果:code:`exe`是用CPUPlace来初始化的,模型会在CPU中运行。在这种情况下,多线程用于运行模型,同时线程的数目和逻辑核的数目相等。用户可以配置`CPU_NUM`以更改使用中的线程数目。
1. :ref:`cn_api_fluid_CompiledProgram` 的构造函数需要经过 :code:`fluid.Program` 设置后运行,这在运行时内无法被修改。
2. 如果 :code:`exe` 是用CUDAPlace来初始化的,模型会在GPU中运行。在显卡训练模式中,所有的显卡都将被占用。用户可以配置 `CUDA_VISIBLE_DEVICES <http://www.acceleware.com/blog/cudavisibledevices-masking-gpus>`_ 以更改被占用的显卡。
3. 如果 :code:`exe` 是用CPUPlace来初始化的,模型会在CPU中运行。在这种情况下,多线程用于运行模型,同时线程的数目和逻辑核的数目相等。用户可以配置 ``CPU_NUM`` 以更改使用中的线程数目。
进阶使用
###############
......
.. _train_on_baidu_cloud_cn:
在百度云启动Fluid分布式训练
在百度云启动分布式训练
=========================
PaddlePaddle Fluid分布式训练,可以不依赖集群系统(比如MPI,Kubernetes)启动分布式训练。
......
......@@ -8,13 +8,13 @@
- `基本概念 <../user_guides/howto/basic_concept/index_cn.html>`_ :介绍了Fluid的基本使用概念
- `准备数据 <../user_guides/howto/prepare_data/index.html>`_ :介绍使用 Fluid 训练网络时,数据的支持类型及传输方法
- `准备数据 <../user_guides/howto/prepare_data/index_cn.html>`_ :介绍使用 Fluid 训练网络时,数据的支持类型及传输方法
- `配置简单的网络 <../user_guides/howto/configure_simple_model/index.html>`_: 介绍如何针对问题建模,并利用 Fluid 中相关算子搭建网络
- `配置简单的网络 <../user_guides/howto/configure_simple_model/index_cn.html>`_: 介绍如何针对问题建模,并利用 Fluid 中相关算子搭建网络
- `训练神经网络 <../user_guides/howto/training/index.html>`_:介绍如何使用 Fluid 进行单机训练、多机训练、以及保存和载入模型变量
- `训练神经网络 <../user_guides/howto/training/index_cn.html>`_:介绍如何使用 Fluid 进行单机训练、多机训练、以及保存和载入模型变量
- `模型评估与调试 <../user_guides/howto/evaluation_and_debugging/index.html>`_:介绍在 Fluid 下进行模型评估和调试的方法,包括:
- `模型评估与调试 <../user_guides/howto/evaluation_and_debugging/index_cn.html>`_:介绍在 Fluid 下进行模型评估和调试的方法,包括:
基于 Fluid 复现的多领域经典模型:
......@@ -24,8 +24,8 @@
:hidden:
howto/basic_concept/index_cn.rst
howto/prepare_data/index
howto/configure_simple_model/index
howto/training/index
howto/evaluation_and_debugging/index
howto/prepare_data/index_cn.rst
howto/configure_simple_model/index_cn.rst
howto/training/index_cn.rst
howto/evaluation_and_debugging/index_cn.rst
models/index_cn.rst
......@@ -87,7 +87,7 @@ Automatic Speech Recognition (ASR) is a technique for transcribing vocabulary co
Different from the end-to-end direct prediction for word distribution of the deep learning model `DeepSpeech <https://github.com/PaddlePaddle/DeepSpeech>`__ , this example is closer to the traditional language recognition process. With phoneme as the modeling unit, it focuses on the training of acoustic models in speech recognition, use `kaldi <http://www.kaldi-asr.org>`__ for feature extraction and label alignment of audio data, and integrate kaldi's decoder to complete decoding.
- `DeepASR <https://github.com/PaddlePaddle/models/blob/develop/DeepASR/README_cn.md>`__
- `DeepASR <https://github.com/PaddlePaddle/models/blob/develop/PaddleSpeech/DeepASR/README.md>`__
Machine Translation
---------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册