Skip to content

Commit

Permalink
添加 enable_to_static 的中文文档 (#6179)
Browse files Browse the repository at this point in the history
* add enable_to_static_cn

* change overview:

* Apply suggestions from code review

Co-authored-by: Nyakku Shigure <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nyakku Shigure <[email protected]>

* add True/False meaning

* Apply suggestions from code review

Co-authored-by: Nyakku Shigure <[email protected]>

---------

Co-authored-by: Nyakku Shigure <[email protected]>
  • Loading branch information
DrRyanHuang and SigureMo authored Sep 12, 2023
1 parent b24470e commit 3cc1603
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/api/paddle/jit/Overview_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ paddle.jit 目录下包含飞桨框架支持动态图转静态图相关的 API
" :ref:`load <cn_api_paddle_jit_load>` ", "动转静模型载入接口"
" :ref:`ignore_module <cn_api_paddle_jit_ignore_module>` ", "增加动转静过程中忽略转写的模块"
" :ref:`TranslatedLayer <cn_api_paddle_jit_TranslatedLayer>` ", "是一个命令式编程模式 :ref:`cn_api_paddle_nn_Layer` 的继承类"
" :ref:`enable_to_static <cn_api_paddle_jit_enable_to_static>` ", "开启模型动转静功能接口"


.. _about_debug:
Expand Down
20 changes: 20 additions & 0 deletions docs/api/paddle/jit/enable_to_static_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. _cn_api_paddle_jit_enable_to_static:

enable_to_static
-------------------------------

.. py:function:: paddle.jit.enable_to_static(enable_to_static_bool)
全局启用或禁用从动态图到静态图的转换。


参数
::::::::::::

- **enable_to_static_bool** (bool) - 启用或禁用动转静。为 ``True`` 时启用动转静, 为 ``False`` 时关闭动转静。


代码示例
::::::::::::

COPY-FROM: paddle.jit.enable_to_static

0 comments on commit 3cc1603

Please sign in to comment.