Skip to content

Commit c165e6f

Browse files
Le-soleileCopilot
andauthored
[API Compatibility] Modify and supplement documents (#7898)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 49f5a0c commit c165e6f

17 files changed

Lines changed: 235 additions & 12 deletions

docs/api/paddle/Overview_cn.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ tensor 数学操作原位(inplace)版本
240240
" :ref:`paddle.round_ <cn_api_paddle_round_>` ", "Inplace 版本的 round API,对输入 x 采用 Inplace 策略"
241241
" :ref:`paddle.rsqrt_ <cn_api_paddle_rsqrt_>` ", "Inplace 版本的 rsqrt API,对输入 x 采用 Inplace 策略"
242242
" :ref:`paddle.scale_ <cn_api_paddle_scale_>` ", "Inplace 版本的 scale API,对输入 x 采用 Inplace 策略"
243+
" :ref:`paddle.sigmoid_ <cn_api_paddle_sigmoid_>` ", "Inplace 版本的 sigmoid API,对输入 x 采用 Inplace 策略"
243244
" :ref:`paddle.sqrt_ <cn_api_paddle_sqrt_>` ", "Inplace 版本的 sqrt API,对输入 x 采用 Inplace 策略"
244245
" :ref:`paddle.square_ <cn_api_paddle_square_>` ", "Inplace 版本的 square API,对输入 x 采用 Inplace 策略"
245246
" :ref:`paddle.sin_ <cn_api_paddle_sin_>` ", "Inplace 版本的 sin API,对输入 x 采用 Inplace 策略"
@@ -249,8 +250,13 @@ tensor 数学操作原位(inplace)版本
249250
" :ref:`paddle.sub_ <cn_api_paddle_sub_>` ", "Inplace 版本的 sub API,对输入 x 采用 Inplace 策略"
250251
" :ref:`paddle.tan_ <cn_api_paddle_tan_>` ", "Inplace 版本的 tan API,对输入 x 采用 Inplace 策略"
251252
" :ref:`paddle.cos_ <cn_api_paddle_cos_>` ", "Inplace 版本的 cos API,对输入 x 采用 Inplace 策略"
253+
" :ref:`paddle.cosh_ <cn_api_paddle_cosh_>` ", "Inplace 版本的 cosh API,对输入 x 采用 Inplace 策略"
252254
" :ref:`paddle.atan_ <cn_api_paddle_atan_>` ", "Inplace 版本的 atan API,对输入 x 采用 Inplace 策略"
255+
" :ref:`paddle.atanh_ <cn_api_paddle_atanh_>` ", "Inplace 版本的 atanh API,对输入 x 采用 Inplace 策略"
253256
" :ref:`paddle.acos_ <cn_api_paddle_acos_>` ", "Inplace 版本的 acos API,对输入 x 采用 Inplace 策略"
257+
" :ref:`paddle.acosh_ <cn_api_paddle_acosh_>` ", "Inplace 版本的 acosh API,对输入 x 采用 Inplace 策略"
258+
" :ref:`paddle.asin_ <cn_api_paddle_asin_>` ", "Inplace 版本的 asin API,对输入 x 采用 Inplace 策略"
259+
" :ref:`paddle.asinh_ <cn_api_paddle_asinh_>` ", "Inplace 版本的 asinh API,对输入 x 采用 Inplace 策略"
254260
" :ref:`paddle.uniform_ <cn_api_paddle_uniform_>` ", "Inplace 版本的 uniform API,对输入 x 采用 Inplace 策略"
255261
" :ref:`paddle.random_ <cn_api_paddle_random_>` ", "Inplace 版本的 random API,对输入 x 采用 Inplace 策略"
256262
" :ref:`paddle.lerp_ <cn_api_paddle_lerp_>` ", "Inplace 版本的 lerp API,对输入 x 采用 Inplace 策略"

docs/api/paddle/Tensor__upper_cn.rst

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,25 @@ acos(name=None)
559559

560560
请参考 :ref:`cn_api_paddle_acos`
561561

562+
acos_(name=None)
563+
:::::::::
564+
565+
Inplace 版本的 :ref:`cn_api_paddle_acos` API,对输入 ``x`` 采用 Inplace 策略。
566+
567+
acosh(name=None)
568+
:::::::::
569+
570+
返回:计算后的 Tensor
571+
572+
返回类型:Tensor
573+
574+
请参考 :ref:`cn_api_paddle_acosh`
575+
576+
acosh_(name=None)
577+
:::::::::
578+
579+
Inplace 版本的 :ref:`cn_api_paddle_acosh` API,对输入 ``x`` 采用 Inplace 策略。
580+
562581
add(y, name=None, \*, alpha=1, out=None)
563582
:::::::::
564583

@@ -679,6 +698,25 @@ asin(name=None)
679698

680699
请参考 :ref:`cn_api_paddle_asin`
681700

701+
asin_(name=None)
702+
:::::::::
703+
704+
Inplace 版本的 :ref:`cn_api_paddle_asin` API,对输入 ``x`` 采用 Inplace 策略。
705+
706+
asinh(name=None)
707+
:::::::::
708+
709+
返回:计算后的 Tensor
710+
711+
返回类型:Tensor
712+
713+
请参考 :ref:`cn_api_paddle_asinh`
714+
715+
asinh_(name=None)
716+
:::::::::
717+
718+
Inplace 版本的 :ref:`cn_api_paddle_asinh` API,对输入 ``x`` 采用 Inplace 策略。
719+
682720
astype(dtype)
683721
:::::::::
684722

@@ -925,6 +963,25 @@ atan(name=None)
925963

926964
请参考 :ref:`cn_api_paddle_atan`
927965

966+
atan_(name=None)
967+
:::::::::
968+
969+
Inplace 版本的 :ref:`cn_api_paddle_atan` API,对输入 ``x`` 采用 Inplace 策略。
970+
971+
atanh(name=None)
972+
:::::::::
973+
974+
返回:计算后的 Tensor
975+
976+
返回类型:Tensor
977+
978+
请参考 :ref:`cn_api_paddle_atanh`
979+
980+
atanh_(name=None)
981+
:::::::::
982+
983+
Inplace 版本的 :ref:`cn_api_paddle_atanh` API,对输入 ``x`` 采用 Inplace 策略。
984+
928985
backward(grad_tensor=None, retain_graph=False)
929986
:::::::::
930987

@@ -1183,6 +1240,11 @@ cos(name=None)
11831240

11841241
请参考 :ref:`cn_api_paddle_cos`
11851242

1243+
cos_(name=None)
1244+
:::::::::
1245+
1246+
Inplace 版本的 :ref:`cn_api_paddle_cos` API,对输入 ``x`` 采用 Inplace 策略。
1247+
11861248
cosh(name=None)
11871249
:::::::::
11881250

@@ -1195,6 +1257,11 @@ cosh(name=None)
11951257
**代码示例**
11961258
COPY-FROM: paddle.cosh
11971259

1260+
cosh_(name=None)
1261+
:::::::::
1262+
1263+
Inplace 版本的 :ref:`cn_api_paddle_cosh` API,对输入 ``x`` 采用 Inplace 策略。
1264+
11981265
count_nonzero(axis=None, keepdim=False, name=None)
11991266
:::::::::
12001267

@@ -1425,6 +1492,20 @@ exp_(name=None)
14251492

14261493
Inplace 版本的 :ref:`cn_api_paddle_exp` API,对输入 ``x`` 采用 Inplace 策略。
14271494

1495+
expm1(name=None)
1496+
:::::::::
1497+
1498+
返回:计算后的 Tensor
1499+
1500+
返回类型:Tensor
1501+
1502+
请参考 :ref:`cn_api_paddle_expm1`
1503+
1504+
expm1_(name=None)
1505+
:::::::::
1506+
1507+
Inplace 版本的 :ref:`cn_api_paddle_expm1` API,对输入 ``x`` 采用 Inplace 策略。
1508+
14281509
expand(shape, name=None)
14291510
:::::::::
14301511

@@ -2623,6 +2704,21 @@ shard_index(index_num, nshards, shard_id, ignore_value=-1)
26232704
请参考 :ref:`cn_api_paddle_shard_index`
26242705

26252706

2707+
sigmoid(name=None)
2708+
:::::::::
2709+
2710+
返回:计算后的 Tensor
2711+
2712+
返回类型:Tensor
2713+
2714+
请参考 :ref:`cn_api_paddle_nn_functional_sigmoid`
2715+
2716+
sigmoid_(name=None)
2717+
:::::::::
2718+
2719+
Inplace 版本的 :ref:`cn_api_paddle_nn_functional_sigmoid` API,对输入 ``x`` 采用 Inplace 策略。
2720+
2721+
26262722
sign(name=None)
26272723
:::::::::
26282724

@@ -2650,6 +2746,11 @@ sin(name=None)
26502746

26512747
请参考 :ref:`cn_api_paddle_sin`
26522748

2749+
sin_(name=None)
2750+
:::::::::
2751+
2752+
Inplace 版本的 :ref:`cn_api_paddle_sin` API,对输入 ``x`` 采用 Inplace 策略。
2753+
26532754
sinh(name=None)
26542755
:::::::::
26552756

@@ -2658,6 +2759,11 @@ sinh(name=None)
26582759
**代码示例**
26592760
COPY-FROM: paddle.sinh
26602761

2762+
sinh_(name=None)
2763+
:::::::::
2764+
2765+
Inplace 版本的 :ref:`cn_api_paddle_sinh` API,对输入 ``x`` 采用 Inplace 策略。
2766+
26612767
slice(axes, starts, ends)
26622768
:::::::::
26632769

@@ -2772,6 +2878,11 @@ square(name=None)
27722878

27732879
请参考 :ref:`cn_api_paddle_square`
27742880

2881+
square_(name=None)
2882+
:::::::::
2883+
2884+
Inplace 版本的 :ref:`cn_api_paddle_square` API,对输入 ``x`` 采用 Inplace 策略。
2885+
27752886
squeeze(axis=None, name=None)
27762887
:::::::::
27772888

@@ -2886,6 +2997,20 @@ t(name=None)
28862997

28872998
请参考 :ref:`cn_api_paddle_t`
28882999

3000+
tan(name=None)
3001+
:::::::::
3002+
3003+
返回:计算后的 Tensor
3004+
3005+
返回类型:Tensor
3006+
3007+
请参考 :ref:`cn_api_paddle_tan`
3008+
3009+
tan_(name=None)
3010+
:::::::::
3011+
3012+
Inplace 版本的 :ref:`cn_api_paddle_tan` API,对输入 ``x`` 采用 Inplace 策略。
3013+
28893014
tanh(name=None)
28903015
:::::::::
28913016

@@ -2903,6 +3028,14 @@ Inplace 版本的 :ref:`cn_api_paddle_tan` API,对输入 ``x`` 采用 Inplace
29033028
tile(repeat_times, name=None)
29043029
:::::::::
29053030

3031+
本方法支持两种调用方式:
3032+
3033+
1. **Paddle 风格**: ``x.tile(repeat_times, name=None)``
3034+
使用张量序列或 Tensor 指定各维度复制次数。
3035+
3036+
2. **PyTorch 风格**: ``x.tile(*dims)``
3037+
使用可变数量的整数参数指定各维度复制次数。
3038+
29063039
返回:计算后的 Tensor
29073040

29083041
返回类型:Tensor

docs/api/paddle/acos__cn.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ acos\_
44
-------------------------------
55

66
.. py:function:: paddle.acos_(x, name=None)
7-
Inplace 版本的 :ref:`cn_api_paddle_acos` API,对输入 x 采用 Inplace 策略。
7+
8+
Inplace 版本的 :ref:`cn_api_paddle_acos` API,对输入 ``x`` 采用 Inplace 策略。
89

910
更多关于 inplace 操作的介绍请参考 `3.1.3 原位(Inplace)操作和非原位操作的区别`_ 了解详情。
1011

docs/api/paddle/acosh__cn.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _cn_api_paddle_acosh_:
2+
3+
acosh\_
4+
-------------------------------
5+
6+
.. py:function:: paddle.acosh_(x, name=None)
7+
8+
Inplace 版本的 :ref:`cn_api_paddle_acosh` API,对输入 ``x`` 采用 Inplace 策略。
9+
10+
更多关于 inplace 操作的介绍请参考 `3.1.3 原位(Inplace)操作和非原位操作的区别`_ 了解详情。
11+
12+
.. _3.1.3 原位(Inplace)操作和非原位操作的区别: https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/beginner/tensor_cn.html#id3

docs/api/paddle/asin__cn.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _cn_api_paddle_asin_:
2+
3+
asin\_
4+
-------------------------------
5+
6+
.. py:function:: paddle.asin_(x, name=None)
7+
8+
Inplace 版本的 :ref:`cn_api_paddle_asin` API,对输入 ``x`` 采用 Inplace 策略。
9+
10+
更多关于 inplace 操作的介绍请参考 `3.1.3 原位(Inplace)操作和非原位操作的区别`_ 了解详情。
11+
12+
.. _3.1.3 原位(Inplace)操作和非原位操作的区别: https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/beginner/tensor_cn.html#id3

docs/api/paddle/asinh__cn.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _cn_api_paddle_asinh_:
2+
3+
asinh\_
4+
-------------------------------
5+
6+
.. py:function:: paddle.asinh_(x, name=None)
7+
8+
Inplace 版本的 :ref:`cn_api_paddle_asinh` API,对输入 ``x`` 采用 Inplace 策略。
9+
10+
更多关于 inplace 操作的介绍请参考 `3.1.3 原位(Inplace)操作和非原位操作的区别`_ 了解详情。
11+
12+
.. _3.1.3 原位(Inplace)操作和非原位操作的区别: https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/beginner/tensor_cn.html#id3

docs/api/paddle/atan__cn.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ atan\_
44
-------------------------------
55

66
.. py:function:: paddle.atan_(x, name=None)
7-
Inplace 版本的 :ref:`cn_api_paddle_atan` API,对输入 x 采用 Inplace 策略。
7+
8+
Inplace 版本的 :ref:`cn_api_paddle_atan` API,对输入 ``x`` 采用 Inplace 策略。
89

910
更多关于 inplace 操作的介绍请参考 `3.1.3 原位(Inplace)操作和非原位操作的区别`_ 了解详情。
1011

docs/api/paddle/atanh__cn.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _cn_api_paddle_atanh_:
2+
3+
atanh\_
4+
-------------------------------
5+
6+
.. py:function:: paddle.atanh_(x, name=None)
7+
8+
Inplace 版本的 :ref:`cn_api_paddle_atanh` API,对输入 ``x`` 采用 Inplace 策略。
9+
10+
更多关于 inplace 操作的介绍请参考 `3.1.3 原位(Inplace)操作和非原位操作的区别`_ 了解详情。
11+
12+
.. _3.1.3 原位(Inplace)操作和非原位操作的区别: https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/beginner/tensor_cn.html#id3

docs/api/paddle/ceil__cn.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
ceil\_
44
-------------------------------
55

6-
.. py:function:: paddle.ceil_(x)
6+
.. py:function:: paddle.ceil_(x, name=None)
77
8-
Inplace 版本的 :ref:`cn_api_paddle_ceil` API,对输入 x 采用 Inplace 策略。
8+
Inplace 版本的 :ref:`cn_api_paddle_ceil` API,对输入 ``x`` 采用 Inplace 策略。
99

1010
更多关于 inplace 操作的介绍请参考 `3.1.3 原位(Inplace)操作和非原位操作的区别`_ 了解详情。
1111

docs/api/paddle/cosh__cn.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _cn_api_paddle_cosh_:
2+
3+
cosh\_
4+
-------------------------------
5+
6+
.. py:function:: paddle.cosh_(x, name=None)
7+
8+
Inplace 版本的 :ref:`cn_api_paddle_cosh` API,对输入 ``x`` 采用 Inplace 策略。
9+
10+
更多关于 inplace 操作的介绍请参考 `3.1.3 原位(Inplace)操作和非原位操作的区别`_ 了解详情。
11+
12+
.. _3.1.3 原位(Inplace)操作和非原位操作的区别: https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/beginner/tensor_cn.html#id3

0 commit comments

Comments
 (0)