Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加 enable_to_static 的中文文档 #6179

Merged
merged 6 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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