correct_cell_api_description

This commit is contained in:
7347157+joylvliang@user.noreply.gitee.com 2022-03-22 19:11:51 +08:00
parent 237bc82733
commit 2826a8aa87
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.