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.
add disable_dygraph enable_dygraph en cn docs (PaddlePaddle#1869)
* add disable_dygraph enable_dygraph en cn docs test=develop * clean DS_Store test=develop
- Loading branch information
1 parent
daf589a
commit 580ab98
Showing
19 changed files
with
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.DS_Store | ||
.vscode/ | ||
/doc/fluid/menu.zh.json | ||
/doc/fluid/menu.en.json | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,11 @@ | ||
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` | ||
!DO NOT EDIT THIS FILE MANUALLY! | ||
.. _api_fluid_disable_dygraph: | ||
|
||
disable_dygraph | ||
--------------- | ||
|
||
.. autofunction:: paddle.fluid.disable_dygraph | ||
:noindex: | ||
|
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,11 @@ | ||
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` | ||
!DO NOT EDIT THIS FILE MANUALLY! | ||
.. _api_fluid_enable_dygraph: | ||
|
||
enable_dygraph | ||
-------------- | ||
|
||
.. autofunction:: paddle.fluid.enable_dygraph | ||
:noindex: | ||
|
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,22 @@ | ||
.. _cn_api_fluid_disable_dygraph: | ||
|
||
disable_dygraph | ||
------------------------------- | ||
|
||
.. py:function:: paddle.fluid.disable_dygraph() | ||
该接口关闭动态图模式。 | ||
|
||
返回:无 | ||
|
||
**示例代码** | ||
|
||
.. code-block:: python | ||
import paddle.fluid as fluid | ||
import numpy as np | ||
fluid.enable_dygraph() # Now we are in dygraph mode | ||
print(fluid.in_dygraph_mode()) # True | ||
fluid.disable_dygraph() | ||
print(fluid.in_dygraph_mode()) # False | ||
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,25 @@ | ||
.. _cn_api_fluid_enable_dygraph: | ||
|
||
enable_dygraph | ||
------------------------------- | ||
|
||
.. py:function:: paddle.fluid.enable_dygraph(place=None) | ||
该接口打开动态图模式。 | ||
|
||
参数: | ||
- **place** (fluid.CPUPlace 或 fluid.CUDAPlace,可选) - 执行动态图的设备数目。若为None,则设备根据paddle的编译方式决定。默认值为 ``None``。 | ||
|
||
返回:无 | ||
|
||
**示例代码** | ||
|
||
.. code-block:: python | ||
import paddle.fluid as fluid | ||
import numpy as np | ||
fluid.enable_dygraph() # Now we are in dygraph mode | ||
print(fluid.in_dygraph_mode()) # True | ||
fluid.disable_dygraph() | ||
print(fluid.in_dygraph_mode()) # False | ||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.