提交 ab9206be 编写于 作者: Z zhangting2020

remove init_on_cpu and force_init_on_cpu APIs, test=develop

上级 376a3ff1
...@@ -9,8 +9,6 @@ fluid.initializer ...@@ -9,8 +9,6 @@ fluid.initializer
initializer/BilinearInitializer.rst initializer/BilinearInitializer.rst
initializer/Constant.rst initializer/Constant.rst
initializer/ConstantInitializer.rst initializer/ConstantInitializer.rst
initializer/force_init_on_cpu.rst
initializer/init_on_cpu.rst
initializer/MSRA.rst initializer/MSRA.rst
initializer/MSRAInitializer.rst initializer/MSRAInitializer.rst
initializer/Normal.rst initializer/Normal.rst
......
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_initializer_force_init_on_cpu:
force_init_on_cpu
-----------------
.. autofunction:: paddle.fluid.initializer.force_init_on_cpu
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_initializer_init_on_cpu:
init_on_cpu
-----------
.. autofunction:: paddle.fluid.initializer.init_on_cpu
:noindex:
...@@ -12,8 +12,6 @@ fluid.initializer ...@@ -12,8 +12,6 @@ fluid.initializer
initializer_cn/BilinearInitializer_cn.rst initializer_cn/BilinearInitializer_cn.rst
initializer_cn/Constant_cn.rst initializer_cn/Constant_cn.rst
initializer_cn/ConstantInitializer_cn.rst initializer_cn/ConstantInitializer_cn.rst
initializer_cn/force_init_on_cpu_cn.rst
initializer_cn/init_on_cpu_cn.rst
initializer_cn/MSRA_cn.rst initializer_cn/MSRA_cn.rst
initializer_cn/MSRAInitializer_cn.rst initializer_cn/MSRAInitializer_cn.rst
initializer_cn/Normal_cn.rst initializer_cn/Normal_cn.rst
......
.. _cn_api_fluid_initializer_force_init_on_cpu:
force_init_on_cpu
-------------------------------
.. py:function:: paddle.fluid.initializer.force_init_on_cpu()
该接口获得一个是否强制在CPU上初始化变量的布尔型标志位。
返回:状态,是否应强制在CPU上强制进行变量初始化
返回类型:bool
**代码示例**:
.. code-block:: python
import paddle.fluid as fluid
if fluid.initializer.force_init_on_cpu():
step = fluid.layers.create_global_var(shape=[2,3], value=1.0, dtype='float32')
.. _cn_api_fluid_initializer_init_on_cpu:
init_on_cpu
-------------------------------
.. py:function:: paddle.fluid.initializer.init_on_cpu()
该接口设置强制变量在 cpu 上初始化。
返回:无
**代码示例**
.. code-block:: python
import paddle.fluid as fluid
with fluid.initializer.init_on_cpu():
step = fluid.layers.create_global_var(shape=[2,3], value=1.0, dtype='float32')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册