Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docathon][ApiLabel][task 1-4] clean some legacy concepts and api labels #6206

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

提高 CPU 使用率主要依赖 :code:`ParallelExecutor`,可以充分利用多个 CPU 的计算能力来加速计算。

API 详细使用方法参考 :ref:`cn_api_fluid_ParallelExecutor` ,简单实例用法:
简单实例用法:

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/static/BuildStrategy_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BuildStrategy

.. py:class:: paddle.static.BuildStrategy
``BuildStrategy`` 使用户更方便地控制 :ref:`cn_api_fluid_ParallelExecutor` 中计算图的建造方法,可通过设置 ``ParallelExecutor`` 中的 ``BuildStrategy`` 成员来实现此功能。
``BuildStrategy`` 使用户更方便地控制 ``ParallelExecutor`` 中计算图的建造方法,可通过设置 ``ParallelExecutor`` 中的 ``BuildStrategy`` 成员来实现此功能。

返回
:::::::::
Expand Down
2 changes: 0 additions & 2 deletions docs/api/paddle/static/Overview_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ Executor 相关 API

" :ref:`BuildStrategy <cn_api_paddle_static_BuildStrategy>` ", "控制 ParallelExecutor 中计算图的建造方法"
" :ref:`CompiledProgram <cn_api_paddle_static_CompiledProgram>` ", "转化和优化 Program 或 Graph"
" :ref:`ExecutionStrategy <cn_api_fluid_ExecutionStrategy>` ", "调整 Executor 执行配置"
" :ref:`Executor <cn_api_paddle_static_Executor>` ", "执行器"
" :ref:`ParallelExecutor <cn_api_fluid_ParallelExecutor>` ", "支持基于数据并行的多节点模型训练和测试的执行器"

.. _about_nn:

Expand Down
4 changes: 2 additions & 2 deletions docs/api/paddle/static/Variable_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,15 @@ lod_level
.. note::
该属性是只读属性。

:ref:`api_guide_Variable` 的 ``LoD`` 信息,关于 ``LoD`` 可以参考 :ref:`api_fluid_LoDTensor` 相关内容
:ref:`api_guide_Variable` 的 ``LoD`` 信息。

type
'''''''''

.. note::
该属性是只读属性。

:ref:`api_guide_Variable` 的内存模型,例如是::ref:`api_fluid_LoDTensor`,或者 SelectedRows。
:ref:`api_guide_Variable` 的内存模型,例如是:``LoDTensor``,或者 ``SelectedRows``

ndim
'''''''''
Expand Down
3 changes: 1 addition & 2 deletions docs/api_guides/low_level/layers/data_in_out.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ Fluid 支持在训练/预测阶段获取当前 batch 的数据。
fetch 期望的输出变量,通过设置 :code:`return_numpy` 参数设置是否将输出数据转为 numpy array。
:code:`return_numpy` 为 :code:`False` ,则返回 :code:`LoDTensor` 类型数据。

具体使用方式请参考相关 API 文档 :ref:`cn_api_fluid_executor_Executor` 和
:ref:`cn_api_fluid_ParallelExecutor`。
具体使用方式请参考相关 API 文档 :ref:`cn_api_paddle_static_Executor`。
2 changes: 1 addition & 1 deletion docs/api_guides/low_level/layers/sequence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
在深度学习领域许多问题涉及到对 `序列(sequence) <https://en.wikipedia.org/wiki/Sequence>`_ 的处理。
从 Wiki 上的释义可知,序列可以表征多种物理意义,但在深度学习中,最常见的仍然是"时间序列"——一个序列包含多个时间步的信息。

在 Paddle Fluid 中,我们将序列表示为 :ref:`cn_api_fluid_LoDTensor`
在 Paddle Fluid 中,我们将序列表示为 ``LoDTensor``
因为一般进行神经网络计算时都是一个 batch 一个 batch 地计算,所以我们用一个 LoDTensor 来存储一个 mini batch 的序列。
一个 LoDTensor 的第 0 维包含该 mini batch 中所有序列的所有时间步,并且用 LoD 来记录各个序列的长度,区分不同序列。
而在运算时,还需要根据 LoD 信息将 LoDTensor 中一个 mini batch 的第 0 维拆开成多个序列。(具体请参考上述 LoD 相关的文档。)
Expand Down
2 changes: 1 addition & 1 deletion docs/api_guides/low_level/layers/sequence_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Sequence
Many problems in the field of deep learning involve the processing of the `sequence <https://en.wikipedia.org/wiki/Sequence>`_.
From Wiki's definition, sequences can represent a variety of physical meanings, but in deep learning, the most common is still "time sequence" - a sequence containing information of multiple time steps.

In Paddle Fluid, we represent the sequence as :ref:`api_fluid_LoDTensor`.
In Paddle Fluid, we represent the sequence as ``LoDTensor``.
Because the general neural network performs computing batch by batch, we use a LoDTensor to store a mini batch of sequences.
The 0th dimension of a LoDTensor contains all the time steps of all sequences in the mini batch, and LoD is used to record the length of each sequence to distinguish different sequences.
In the calculation, it is also necessary to split the 0th dimension of a mini batch in the LoDTensor into a number of sequences according to the LoD information. (Please refer to the LoD related documents for details. )
Expand Down
5 changes: 2 additions & 3 deletions docs/api_guides/low_level/parallel_executor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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` 需要进行的循环次数。


.. code-block:: python
Expand Down Expand Up @@ -63,5 +63,4 @@
train_loss, = train_exe.run(fetch_list=[loss.name], feed=feed_dict)
test_loss, = test_exe.run(fetch_list=[loss.name], feed=feed_dict)
- 相关 API :
- :ref:`cn_api_fluid_ParallelExecutor`
- :ref:`cn_api_fluid_BuildStrategy`
- :ref:`cn_api_paddle_static_BuildStrategy`