forked from PaddlePaddle/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Docathon][Add CN Doc No.10-11] (PaddlePaddle#6363)
* add docs * Update Overview_cn.rst
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. _cn_api_paddle_get_rng_state: | ||
|
||
get_rng_state | ||
------------------------------- | ||
.. py:function:: paddle.get_rng_state(device=None) | ||
获取指定设备的随机数生成器的所有随机状态。 | ||
|
||
参数 | ||
:::::::::::: | ||
- **device** (str) - 此参数决定了具体的运行设备。可以是 ``cpu``、``gpu``、``xpu``。默认值为 None。如果为 None,则返回当前设备(由 ``set_device`` 指定)的生成器。 | ||
|
||
返回 | ||
:::::::::::: | ||
- GeneratorState:对象。 | ||
|
||
代码示例 | ||
:::::::::::: | ||
|
||
COPY-FROM: paddle.get_rng_state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. _cn_api_paddle_set_rng_state: | ||
|
||
set_rng_state | ||
------------------------------- | ||
|
||
.. py:function:: paddle.set_rng_state(state_list, device=None) | ||
为所有设备生成器设置生成器状态。 | ||
|
||
参数 | ||
:::::::::::: | ||
- **state_list** (list|tuple) - 要设置回设备生成器的设备状态。state_list 是从 ``get_rng_state()`` 获取的。 | ||
- **device** (str) - 此参数决定了具体的运行设备。可以是 ``cpu``、``gpu``、``xpu``。默认值为 None。如果为 None,则返回当前设备(由 ``set_device`` 指定)的生成器。 | ||
|
||
返回 | ||
:::::::::::: | ||
- 无。 | ||
|
||
|
||
代码示例 | ||
:::::::::::: | ||
|
||
COPY-FROM: paddle.set_rng_state |