Skip to content

Commit e29356c

Browse files
committed
[API Compatibility] Add paddle.Tensor.clamp_ ,paddle.nn.functional.logsigmoid, paddle.functional.meshgrid, paddle.nn.init.calculate_fan_in_and_fan_out ,paddle.autocast
1 parent b404b4d commit e29356c

File tree

8 files changed

+49
-1
lines changed

8 files changed

+49
-1
lines changed

docs/api/paddle/Overview_cn.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,3 +667,14 @@ device 相关
667667

668668
" :ref:`paddle.get_flags <cn_api_paddle_get_flags>` ", "获取指定的 Paddle 环境变量 FLAGS 状态。详情请查看 :ref:`cn_guides_flags_flags`"
669669
" :ref:`paddle.set_flags <cn_api_paddle_set_flags>` ", "设置 Paddle 环境变量 FLAGS,详情请查看 :ref:`cn_guides_flags_flags`"
670+
671+
.. _about_amp:
672+
673+
AMP 相关 API
674+
::::::::::::::::::::
675+
676+
.. csv-table::
677+
:header: "API 名称", "API 功能"
678+
:widths: 10, 30
679+
680+
" :ref:`autocast <cn_api_paddle_autocast>` ", "创建 AMP 上下文环境"

docs/api/paddle/Tensor/Overview_en.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ Methods
100100
clear_gradient
101101
clip
102102
clip_
103+
clamp_
103104
clone
104105
combinations
105106
concat

docs/api/paddle/autocast_cn.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. _cn_api_paddle_autocast:
2+
3+
autocast
4+
-------------------------------
5+
6+
.. py:function:: paddle.autocast(device_type, dtype='float16', enabled=True, cache_enabled =True)
7+
8+
``paddle.amp.autocast`` 的别名,请参考 :ref:`cn_api_paddle_amp_autocast`。

docs/api/paddle/meshgrid_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ meshgrid
88
99
1010
11-
对每个 Tensor 做扩充操作。输入是 Tensor 或者包含 Tensor 的列表,包含 k 个一维 Tensor,输出 k 个 k 维 Tensor。
11+
对每个 Tensor 做扩充操作。输入是 Tensor 或者包含 Tensor 的列表,包含 k 个一维 Tensor,输出 k 个 k 维 Tensor。别名:``paddle.functional.meshgrid``。
1212

1313
参数
1414
::::::::::::

docs/api/paddle/nn/Overview_cn.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ Padding 相关函数
413413
" :ref:`paddle.nn.functional.leaky_relu <cn_api_paddle_nn_functional_leaky_relu>` ", "leaky_relu 激活函数"
414414
" :ref:`paddle.nn.functional.leaky_relu_ <cn_api_paddle_nn_functional_leaky_relu_>` ", "Inplace 版本的 :ref:`cn_api_paddle_nn_functional_leaky_relu` API,对输入 x 采用 Inplace 策略"
415415
" :ref:`paddle.nn.functional.log_sigmoid <cn_api_paddle_nn_functional_log_sigmoid>` ", "log_sigmoid 激活函数"
416+
" :ref:`paddle.nn.functional.logsigmoid <cn_api_paddle_nn_functional_logsigmoid>` ", "log_sigmoid 激活函数"
416417
" :ref:`paddle.nn.functional.log_softmax <cn_api_paddle_nn_functional_log_softmax>` ", "log_softmax 激活函数"
417418
" :ref:`paddle.nn.functional.maxout <cn_api_paddle_nn_functional_maxout>` ", "maxout 激活函数"
418419
" :ref:`paddle.nn.functional.prelu <cn_api_paddle_nn_functional_prelu>` ", "prelu 激活函数"

docs/api/paddle/nn/functional/log_sigmoid_cn.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ log_sigmoid 激活层。计算公式如下:
1616
参数
1717
::::::::::
1818
- **x** (Tensor) - 输入的 ``Tensor``,数据类型为:float32、float64, complex64, complex128。
19+
别名: ``input``
1920
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。
2021

2122
返回
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. _cn_api_paddle_nn_functional_logsigmoid:
2+
3+
logsigmoid
4+
-------------------------------
5+
6+
.. py:function:: paddle.nn.functional.logsigmoid(x, name=None)
7+
8+
``log_sigmoid`` 的别名,请参考 :ref:`cn_api_paddle_nn_functional_log_sigmoid`。
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. _cn_api_paddle_nn_init__calculate_fan_in_and_fan_out:
2+
3+
_calculate_fan_in_and_fan_out
4+
-------------------------------
5+
6+
.. py:class:: paddle.nn.init._calculate_fan_in_and_fan_out(var)
7+
8+
计算神经网络层的输入数和输出数。
9+
10+
参数
11+
::::::::::::
12+
13+
- **var** (Tensor) - 要计算的 Tensor。
14+
15+
返回
16+
::::::::::::
17+
18+
包含两个整数的元组,分别代表输入数和输出数。

0 commit comments

Comments
 (0)