未验证 提交 1c8280ac 编写于 作者: C Chen Long 提交者: GitHub

Fix api bug (#2599)

* add_apis_and_fix_alias

* fix code bugs
上级 ec40ff48
......@@ -3,7 +3,6 @@ paddle.fluid.layers.sigmoid_focal_loss paddle.nn.functional.sigmoid_focal_loss,p
paddle.fluid.layers.smooth_l1 paddle.nn.functional.smooth_l1,paddle.nn.functional.loss.smooth_l1
paddle.nn.functional.loss.l1_loss paddle.nn.functional.l1_loss
paddle.nn.functional.loss.margin_ranking_loss paddle.nn.functional.margin_ranking_loss
paddle.nn.layer.conv paddle.nn.conv
paddle.nn.layer.pooling.AdaptiveAvgPool3d paddle.nn.AdaptiveAvgPool3d,paddle.nn.layer.AdaptiveAvgPool3d
paddle.nn.functional.common.alpha_dropout paddle.nn.functional.alpha_dropout
paddle.nn.functional.activation.logsigmoid paddle.nn.functional.logsigmoid
......@@ -159,7 +158,6 @@ paddle.nn.layer.conv.ConvTranspose2d paddle.nn.ConvTranspose2d,paddle.nn.layer.C
paddle.fluid.dygraph.container.LayerList paddle.nn.LayerList
paddle.fluid.compiler.ExecutionStrategy paddle.static.ExecutionStrategy
paddle.fluid.layers.ceil paddle.ceil,paddle.tensor.ceil,paddle.tensor.math.ceil
paddle.nn.layer.loss paddle.nn.loss
paddle.nn.layer.activation.ReLU paddle.nn.layer.ReLU
paddle.tensor.logic.greater_equal paddle.greater_equal,paddle.tensor.greater_equal
paddle.nn.layer.pooling.AvgPool2d paddle.nn.AvgPool2d,paddle.nn.layer.AvgPool2d
......@@ -266,11 +264,11 @@ paddle.fluid.layers.conv2d paddle.static.nn.conv2d
paddle.fluid.layers.create_parameter paddle.static.nn.create_parameter
paddle.tensor.creation.ones_like paddle.ones_like,paddle.tensor.ones_like
paddle.fluid.layers.sums paddle.sums,paddle.tensor.sums,paddle.tensor.math.sums
paddle.nn.functional.rnn.birnn paddle.nn.functional.birnn
paddle.fluid.layers.rnn.birnn paddle.nn.functional.birnn,paddle.nn.functional.rnn.birnn
paddle.fluid.dygraph.base.no_grad paddle.framework.no_grad
paddle.nn.functional.common.dropout3d paddle.nn.functional.dropout3d
paddle.fluid.layers.polygon_box_transform paddle.nn.functional.polygon_box_transform,paddle.nn.functional.extension.polygon_box_transform
paddle.nn.functional.rnn.rnn paddle.nn.functional.rnn
paddle.fluid.layers.rnn.rnn paddle.nn.functional.rnn,paddle.nn.functional.rnn.rnn
paddle.tensor.search.sort paddle.sort,paddle.tensor.sort
paddle.tensor.logic.equal paddle.equal,paddle.tensor.equal
paddle.fluid.layers.swish paddle.nn.functional.swish,paddle.nn.functional.activation.swish
......@@ -309,7 +307,6 @@ paddle.fluid.clip.GradientClipByNorm paddle.nn.GradientClipByNorm,paddle.nn.clip
paddle.tensor.creation.triu paddle.triu,paddle.tensor.triu
paddle.fluid.layers.reduce_all paddle.reduce_all,paddle.tensor.reduce_all,paddle.tensor.logic.reduce_all
paddle.fluid.layers.rpn_target_assign paddle.nn.functional.rpn_target_assign,paddle.nn.functional.extension.rpn_target_assign
paddle.nn.layer.vision paddle.nn.vision
paddle.fluid.layers.reduce_max paddle.reduce_max,paddle.tensor.reduce_max,paddle.tensor.math.reduce_max
paddle.tensor.random.randperm paddle.randperm,paddle.tensor.randperm
paddle.fluid.layers.deformable_conv paddle.static.nn.deformable_conv
......
.. _cn_api_fluid_dygraph_jit_set_code_level:
set_code_level
-----------------
.. py:function:: paddle.jit.set_code_level(level=100)
设置代码级别,打印该级别 AST Transformer 转化后的代码。
有两种方法设置代码级别:
1. 调用函数 ``set_code_level``
2. 设置环境变量 ``TRANSLATOR_CODE_LEVEL``
.. note::
函数 ``set_code_level`` 的优先级高于环境变量 ``TRANSLATOR_CODE_LEVEL``。
参数:
- **level** (int) - 打印的代码级别。默认值为100,这意味着打印的是所有 AST Transformer 转化后的代码。
**示例代码**
.. code-block:: python
import paddle
import os
paddle.jit.set_code_level(2)
# It will print the transformed code at level 2, which means to print the code after second transformer,
# as the date of August 28, 2020, it is CastTransformer.
os.environ['TRANSLATOR_CODE_LEVEL'] = '3'
# The code level is now 3, but it has no effect because it has a lower priority than `set_code_level`
.. _cn_api_fluid_dygraph_jit_set_verbosity:
set_verbosity
-----------------
.. py:function:: paddle.jit.set_verbosity(level=0)
设置动态图转静态图的日志详细级别。
有两种方法设置日志详细级别:
1. 调用函数 ``set_verbosity``
2. 设置环境变量 ``TRANSLATOR_VERBOSITY``
.. note::
函数 ``set_verbosity`` 的优先级高于环境变量 ``TRANSLATOR_VERBOSITY``。
参数:
- **level** (int) - 日志详细级别。值越大,表示越详细。默认值为0,表示不显示日志。
**示例代码**
.. code-block:: python
import os
import paddle
paddle.jit.set_verbosity(1)
# The verbosity level is now 1
os.environ['TRANSLATOR_VERBOSITY'] = '3'
# The verbosity level is now 3, but it has no effect because it has a lower priority than `set_verbosity`
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册