浏览代码

!7644 modify target and unique api

Merge pull request !7644 from lijiaqi/target_api
tags/v1.1.0
mindspore-ci-bot Gitee 5 年前
父节点
当前提交
d3e48afb06
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. +4
    -3
      mindspore/nn/optim/optimizer.py

+ 4
- 3
mindspore/nn/optim/optimizer.py 查看文件

@@ -176,7 +176,7 @@ class Optimizer(Cell):

@property
def unique(self):
"""This method is to see whether to make unique,This method is read-only."""
"""The method is to see whether to make unique. The input type is bool. The method is read-only."""
return self._unique

@unique.setter
@@ -188,8 +188,9 @@ class Optimizer(Cell):

@property
def target(self):
"""This method is used to determine the value of target and whether the parameter update is performed on
the host or device. This method is read-only."""
"""The method is used to determine whether the parameter is updated on host or device. The input type is str
and can only be 'CPU' and 'Ascend'. In GPU environment, users can only configure value as 'CPU'.
The method is read-only."""
return self._target

@target.setter


正在加载...
取消
保存