!31728 Correct cell api description

Merge pull request !31728 from JoyLvliang/correct_cell_api_description
This commit is contained in:
i-robot 2022-03-24 08:03:26 +00:00 committed by Gitee
commit 8fc4dabaf3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 9 additions and 6 deletions

View File

@ -339,7 +339,7 @@
**返回:**
- **handle** 与hook_fn函数对应的handle对象
`mindspore.common.hook_handle.HookHandle` 类型,与 `hook_fn` 函数对应的 `handle` 对象。可通过调用 `handle.remove()` 来删除添加的 `hook_fn` 函数
**异常:**
@ -362,7 +362,7 @@
**返回:**
- **handle** 与hook_fn函数对应的handle对象
`mindspore.common.hook_handle.HookHandle` 类型,与 `hook_fn` 函数对应的 `handle` 对象。可通过调用 `handle.remove()` 来删除添加的 `hook_fn` 函数
**异常:**
@ -385,7 +385,7 @@
**返回:**
- **handle** 与hook_fn函数对应的handle对象
`mindspore.common.hook_handle.HookHandle` 类型,与 `hook_fn` 函数对应的 `handle` 对象。可通过调用 `handle.remove()` 来删除添加的 `hook_fn` 函数
**异常:**

View File

@ -1674,7 +1674,8 @@ class Cell(Cell_):
hook_fn (function): Python function. Forward pre hook function.
Returns:
- **handle** - The handle corresponding to the 'hook_fn'.
Handle, it is an instance of `mindspore.common.hook_handle.HookHandle` and corresponding to the `hook_fn` .
The handle can be used to remove the added `hook_fn` by calling `handle.remove()` .
Raises:
TypeError: If the `hook_fn` is not a function of python.
@ -1774,7 +1775,8 @@ class Cell(Cell_):
hook_fn (function): Python function. Forward hook function.
Returns:
- **handle** - The handle corresponding to the 'hook_fn'.
Handle, it is an instance of `mindspore.common.hook_handle.HookHandle` and corresponding to the `hook_fn` .
The handle can be used to remove the added `hook_fn` by calling `handle.remove()` .
Raises:
TypeError: If the `hook_fn` is not a function of python.
@ -1879,7 +1881,8 @@ class Cell(Cell_):
hook_fn (function): Python function. Backward hook function.
Returns:
- **handle** - The handle corresponding to the 'hook_fn'.
Handle, it is an instance of `mindspore.common.hook_handle.HookHandle` and corresponding to the `hook_fn` .
The handle can be used to remove the added `hook_fn` by calling `handle.remove()` .
Raises:
TypeError: If the `hook_fn` is not a function of python.