Skip to content

Commit

Permalink
add disable_dygraph enable_dygraph en cn docs (PaddlePaddle#1869)
Browse files Browse the repository at this point in the history
* add disable_dygraph enable_dygraph en cn docs
test=develop

* clean DS_Store
test=develop
  • Loading branch information
JepsonWong authored Mar 5, 2020
1 parent daf589a commit 580ab98
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 0 deletions.
Binary file removed .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
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
Expand Down
Binary file removed doc/.DS_Store
Binary file not shown.
Binary file removed doc/fluid/.DS_Store
Binary file not shown.
Binary file removed doc/fluid/advanced_guide/.DS_Store
Binary file not shown.
Binary file removed doc/fluid/advanced_guide/flags/.DS_Store
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions doc/fluid/api/fluid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ fluid
fluid/DataFeeder.rst
fluid/default_main_program.rst
fluid/default_startup_program.rst
fluid/disable_dygraph.rst
fluid/device_guard.rst
fluid/DistributeTranspiler.rst
fluid/DistributeTranspilerConfig.rst
fluid/embedding.rst
fluid/enable_dygraph.rst
fluid/ExecutionStrategy.rst
fluid/Executor.rst
fluid/global_scope.rst
Expand Down
11 changes: 11 additions & 0 deletions doc/fluid/api/fluid/disable_dygraph.rst
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:

11 changes: 11 additions & 0 deletions doc/fluid/api/fluid/enable_dygraph.rst
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:

2 changes: 2 additions & 0 deletions doc/fluid/api_cn/fluid_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ fluid
fluid_cn/DataFeeder_cn.rst
fluid_cn/default_main_program_cn.rst
fluid_cn/default_startup_program_cn.rst
fluid_cn/disable_dygraph_cn.rst
fluid_cn/device_guard_cn.rst
fluid_cn/DistributeTranspiler_cn.rst
fluid_cn/DistributeTranspilerConfig_cn.rst
fluid_cn/embedding_cn.rst
fluid_cn/enable_dygraph_cn.rst
fluid_cn/ExecutionStrategy_cn.rst
fluid_cn/Executor_cn.rst
fluid_cn/global_scope_cn.rst
Expand Down
22 changes: 22 additions & 0 deletions doc/fluid/api_cn/fluid_cn/disable_dygraph_cn.rst
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
25 changes: 25 additions & 0 deletions doc/fluid/api_cn/fluid_cn/enable_dygraph_cn.rst
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 removed doc/fluid/beginners_guide/.DS_Store
Binary file not shown.
Binary file removed doc/fluid/user_guides/.DS_Store
Binary file not shown.
Binary file removed doc/fluid/user_guides/cv_case/.DS_Store
Binary file not shown.
Binary file removed doc/fluid/user_guides/simple_case/.DS_Store
Binary file not shown.
Binary file removed doc/fluid/user_guides/tools/.DS_Store
Binary file not shown.
Binary file not shown.

0 comments on commit 580ab98

Please sign in to comment.