From e743682d5b43674f4a60d565c23cc7abe246c616 Mon Sep 17 00:00:00 2001 From: guru4elephant <35550832+guru4elephant@users.noreply.github.com> Date: Thu, 4 Jul 2019 11:20:41 +0800 Subject: [PATCH] Refine fleet doc (#983) * Update fleet_api_howto_cn.rst * Update fleet_api_howto_cn.rst * Update fleet_api_howto_cn.rst --- .../user_guides/howto/training/fleet_api_howto_cn.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/fluid/user_guides/howto/training/fleet_api_howto_cn.rst b/doc/fluid/user_guides/howto/training/fleet_api_howto_cn.rst index 46ba0984f..89df47236 100644 --- a/doc/fluid/user_guides/howto/training/fleet_api_howto_cn.rst +++ b/doc/fluid/user_guides/howto/training/fleet_api_howto_cn.rst @@ -9,7 +9,7 @@ Fleet是PaddlePaddle分布式训练的高级API。Fleet的命名出自于PaddleP 快速上手示例 ------------------------------ -用户可以使用Fleet API轻易实现GPU多卡训练(单机多卡/多机多卡)。多卡训练在现代AI模型中非常常见,例如[Resnet50][Bert]等都是非常常见的需要多机多卡训练的模型。下面的代码示例,以一个简单的例子入手展示如何使用Fleet API进行单机多卡训练。代码示例可以参考:[quick-start] +用户可以使用Fleet API轻易实现GPU多卡训练(单机多卡/多机多卡)。多卡训练在现代AI模型中非常常见,例如Resnet50、Bert等都是非常常见的需要多机多卡训练的模型。下面的代码示例,以一个简单的例子入手展示如何使用Fleet API进行单机多卡训练。代码示例可以参考:https://github.com/PaddlePaddle/Fleet 神经网络模型的定义如下: @@ -47,8 +47,7 @@ Fleet是PaddlePaddle分布式训练的高级API。Fleet的命名出自于PaddleP exe.run(feed=gen_data()) -If you want to use high performance chip to do distributed training, such as distributed GPU training, **Fleet API** will help you by adding less than 10 lines of code, source code of this example is in examples/quick-start/collective_trainer.py -如果用户想使用高性能芯片,例如GPU多卡进行训练,使用**Fleet API**可以在增加少量代码的情况下实现。 +如果用户想使用高性能芯片,例如GPU多卡进行训练,使用Fleet API可以在增加少量代码的情况下实现。 .. code-block:: python @@ -82,6 +81,7 @@ If you want to use high performance chip to do distributed training, such as dis .. code-block:: python + export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m paddle.distributed.launch collective_trainer.py @@ -194,3 +194,4 @@ Fleet需要在用户定义的optimizer之上装饰 code:`fleet.distributed_optim fleet.stop_worker() + -- GitLab