refine auto strategy, test=document_fix (#28211)

revert-27871-prv-conv-grad-opt
WangXi 4 years ago committed by GitHub
parent 2db77be423
commit 11acbfae06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1073,8 +1073,12 @@ class DistributedStrategy(object):
import paddle
import paddle.distributed.fleet as fleet
paddle.enable_static()
strategy = fleet.DistributedStrategy()
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 = fleet.distributed_optimizer(optimizer, strategy)

Loading…
Cancel
Save