Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
FluidDoc
提交
26f76cde
F
FluidDoc
项目概览
PaddlePaddle
/
FluidDoc
通知
5
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
23
列表
看板
标记
里程碑
合并请求
111
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FluidDoc
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
23
Issue
23
列表
看板
标记
里程碑
合并请求
111
合并请求
111
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
26f76cde
编写于
5月 14, 2020
作者:
H
hong
提交者:
GitHub
5月 14, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add fluid enable_imperative doc; test=develop (#2099)
上级
eabb8ddb
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
99 addition
and
0 deletion
+99
-0
doc/fluid/api/dygraph.rst
doc/fluid/api/dygraph.rst
+2
-0
doc/fluid/api/dygraph/disable_imperative.rst
doc/fluid/api/dygraph/disable_imperative.rst
+11
-0
doc/fluid/api/dygraph/enable_imperative.rst
doc/fluid/api/dygraph/enable_imperative.rst
+11
-0
doc/fluid/api/fluid.rst
doc/fluid/api/fluid.rst
+2
-0
doc/fluid/api/fluid/disable_imperative.rst
doc/fluid/api/fluid/disable_imperative.rst
+11
-0
doc/fluid/api/fluid/enable_imperative.rst
doc/fluid/api/fluid/enable_imperative.rst
+11
-0
doc/fluid/api_cn/fluid_cn.rst
doc/fluid/api_cn/fluid_cn.rst
+2
-0
doc/fluid/api_cn/fluid_cn/disable_imperative_cn.rst
doc/fluid/api_cn/fluid_cn/disable_imperative_cn.rst
+23
-0
doc/fluid/api_cn/fluid_cn/enable_imperative_cn.rst
doc/fluid/api_cn/fluid_cn/enable_imperative_cn.rst
+26
-0
未找到文件。
doc/fluid/api/dygraph.rst
浏览文件 @
26f76cde
...
...
@@ -16,6 +16,7 @@ fluid.dygraph
dygraph/CosineDecay.rst
dygraph/DataParallel.rst
dygraph/disable_dygraph.rst
dygraph/disable_imperative.rst
dygraph/Dropout.rst
dygraph/dygraph_to_static_code.rst
dygraph/dygraph_to_static_func.rst
...
...
@@ -23,6 +24,7 @@ fluid.dygraph
dygraph/dygraph_to_static_program.rst
dygraph/Embedding.rst
dygraph/enable_dygraph.rst
dygraph/enable_imperative.rst
dygraph/enabled.rst
dygraph/ExponentialDecay.rst
dygraph/grad.rst
...
...
doc/fluid/api/dygraph/disable_imperative.rst
0 → 100644
浏览文件 @
26f76cde
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_dygraph_disable_imperative:
disable_imperative
------------------
.. autofunction:: paddle.fluid.dygraph.disable_imperative
:noindex:
doc/fluid/api/dygraph/enable_imperative.rst
0 → 100644
浏览文件 @
26f76cde
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_dygraph_enable_imperative:
enable_imperative
-----------------
.. autofunction:: paddle.fluid.dygraph.enable_imperative
:noindex:
doc/fluid/api/fluid.rst
浏览文件 @
26f76cde
...
...
@@ -23,10 +23,12 @@ fluid
fluid/default_startup_program.rst
fluid/device_guard.rst
fluid/disable_dygraph.rst
fluid/disable_imperative.rst
fluid/DistributeTranspiler.rst
fluid/DistributeTranspilerConfig.rst
fluid/embedding.rst
fluid/enable_dygraph.rst
fluid/enable_imperative.rst
fluid/ExecutionStrategy.rst
fluid/Executor.rst
fluid/get_flags.rst
...
...
doc/fluid/api/fluid/disable_imperative.rst
0 → 100644
浏览文件 @
26f76cde
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_disable_imperative:
disable_imperative
------------------
.. autofunction:: paddle.fluid.disable_imperative
:noindex:
doc/fluid/api/fluid/enable_imperative.rst
0 → 100644
浏览文件 @
26f76cde
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_enable_imperative:
enable_imperative
-----------------
.. autofunction:: paddle.fluid.enable_imperative
:noindex:
doc/fluid/api_cn/fluid_cn.rst
浏览文件 @
26f76cde
...
...
@@ -24,11 +24,13 @@ fluid
fluid_cn/default_main_program_cn.rst
fluid_cn/default_startup_program_cn.rst
fluid_cn/disable_dygraph_cn.rst
fluid_cn/disable_imperative_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/enable_imperative_cn.rst
fluid_cn/ExecutionStrategy_cn.rst
fluid_cn/Executor_cn.rst
fluid_cn/get_flags_cn.rst
...
...
doc/fluid/api_cn/fluid_cn/disable_imperative_cn.rst
0 → 100644
浏览文件 @
26f76cde
.. _cn_api_fluid_disable_imperative:
disable_imperative
-------------------------------
.. py:function:: paddle.fluid.disable_imperative()
该接口退出动态图模式。
返回:无
**示例代码**
.. code-block:: python
import paddle.fluid as fluid
fluid.enable_imperative() # Now we are in imperative mode
x = fluid.layers.ones( (2, 2), "float32")
y = fluid.layers.zeros( (2, 2), "float32")
z = x + y
print( z.numpy() ) #[[1, 1], [1, 1]]
fluid.disable_imperative() # Now we are in declarative mode
doc/fluid/api_cn/fluid_cn/enable_imperative_cn.rst
0 → 100644
浏览文件 @
26f76cde
.. _cn_api_fluid_enable_imperative:
enable_imperative
-------------------------------
.. py:function:: paddle.fluid.enable_imperative(place=None)
该接口打开动态图模式。
参数:
- **place** (fluid.CPUPlace 或 fluid.CUDAPlace,可选) - 执行动态图的设备。若为None,则设备根据paddle的编译方式决定。默认值为 ``None``。
返回:无
**示例代码**
.. code-block:: python
import paddle.fluid as fluid
fluid.enable_imperative() # Now we are in imperative mode
x = fluid.layers.ones( (2, 2), "float32")
y = fluid.layers.zeros( (2, 2), "float32")
z = x + y
print( z.numpy() ) #[[1, 1], [1, 1]]
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录