forked from mindspore-Ecosystem/mindspore
!31728 Correct cell api description
Merge pull request !31728 from JoyLvliang/correct_cell_api_description
This commit is contained in:
commit
8fc4dabaf3
|
@ -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` 函数。
|
||||
|
||||
**异常:**
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue