!32865 code_docs_parallel_api_fix

Merge pull request !32865 from yao_yf/code_docs_parallel_api_fix
This commit is contained in:
i-robot 2022-04-13 01:17:35 +00:00 committed by Gitee
commit d9dce9715e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 2 deletions

View File

@ -114,7 +114,7 @@
.. note::
- 仅支持 `Graph` 模式。
- 建议使用(cell.recompute(parallel_optimizer_comm_recompute=True/False)去配置由优化器并行生成的 :class:`mindspore.ops.AllGather` 算子,而不是直接使用该接口。
- 建议使用cell.recompute(parallel_optimizer_comm_recompute=True/False)去配置由优化器并行生成的 :class:`mindspore.ops.AllGather` 算子,而不是直接使用该接口。
.. py:method:: requires_grad
:property:

View File

@ -508,7 +508,8 @@ class AdaSumByDeltaWeightWrapCell(Cell):
>>> from mindspore import nn
>>> from mindspore.nn import AdaSumByDeltaWeightWrapCell
>>> net = Net()
>>> optim = AdaSumByGradWrapCell(nn.Momentum(params=net.trainable_params(), learning_rate=0.1, momentum=0.9))
>>> optim = AdaSumByDeltaWeightWrapCell(nn.Momentum(params=net.trainable_params(),
... learning_rate=0.1, momentum=0.9))
>>> loss = nn.SoftmaxCrossEntropyWithLogits()
>>> model = Model(net, loss_fn=loss, optimizer=optim, metrics=None)
"""