未验证 提交 11acbfae 编写于 作者: W WangXi 提交者: GitHub

refine auto strategy, test=document_fix (#28211)

上级 2db77be4
...@@ -1073,8 +1073,12 @@ class DistributedStrategy(object): ...@@ -1073,8 +1073,12 @@ class DistributedStrategy(object):
import paddle import paddle
import paddle.distributed.fleet as fleet import paddle.distributed.fleet as fleet
paddle.enable_static()
strategy = fleet.DistributedStrategy() strategy = fleet.DistributedStrategy()
strategy.auto = True strategy.auto = True
# if set other strategy at the same time, auto will not apply
# strategy.amp = True
optimizer = paddle.optimizer.SGD(learning_rate=0.01) optimizer = paddle.optimizer.SGD(learning_rate=0.01)
optimizer = fleet.distributed_optimizer(optimizer, strategy) optimizer = fleet.distributed_optimizer(optimizer, strategy)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册