!9581 modify example of ParameterUpdate

From: @zhangbuxue
Reviewed-by: @ginfung,@zh_qh
Signed-off-by: @zh_qh
This commit is contained in:
mindspore-ci-bot 2020-12-07 15:54:20 +08:00 committed by Gitee
commit 5a0ae06bb0
1 changed files with 4 additions and 4 deletions

View File

@ -403,12 +403,12 @@ class ParameterUpdate(Cell):
``Ascend``
Examples:
>>> network = Net()
>>> param = network.parameters_dict()['learning_rate']
>>> network = nn.Dense(3, 4)
>>> param = network.parameters_dict()['weight']
>>> update = nn.ParameterUpdate(param)
>>> update.phase = "update_param"
>>> lr = Tensor(0.001, mindspore.float32)
>>> update(lr)
>>> weight = Tensor(0.001, mindspore.float32)
>>> update(weight)
"""
def __init__(self, param):