Skip to content

Commit 20d841a

Browse files
authored
Merge branch 'develop' into api-compat-76301-no155-bce-with-logits-alias
2 parents 6c5faea + 6b293db commit 20d841a

394 files changed

Lines changed: 2004 additions & 1910 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/api/paddle/Overview_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ tensor 元素操作相关原位(inplace)版本
579579
:widths: 10, 30
580580

581581
" :ref:`paddle.cast_ <cn_api_paddle_cast_>` ", "Inplace 版本的 cast API,对输入 x 采用 Inplace 策略"
582-
" :ref:`paddle.index_add_ <cn_api_paddle_index_add_>` ", "Inplace 版本的 :ref:`cn_api_paddle_index_add` API,对输入 `x` 采用 Inplace 策略"
582+
" :ref:`paddle.index_add_ <cn_api_paddle_index_add_>` ", "Inplace 版本的 :ref:`cn_api_paddle_index_add` API,对输入 ``x`` 采用 Inplace 策略"
583583
" :ref:`paddle.index_put_ <cn_api_paddle_index_put_>` ", "依据索引 ``indices`` ,将指定位置的 ``x`` 重新赋值为 ``value`` "
584584
" :ref:`paddle.reshape_ <cn_api_paddle_reshape_>` ", "Inplace 版本的 reshape API,对输入 x 采用 Inplace 策略"
585585
" :ref:`paddle.scatter_ <cn_api_paddle_scatter_>` ", "Inplace 版本的 scatter API,对输入 x 采用 Inplace 策略 "

docs/api/paddle/Tensor__upper_cn.rst

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ add(y, name=None, \*, alpha=1, out=None)
571571
add_(y, name=None, \*, alpha=1, out=None)
572572
:::::::::
573573

574-
Inplace 版本的 :ref:`cn_api_paddle_add` API,对输入 `x` 采用 Inplace 策略。
574+
Inplace 版本的 :ref:`cn_api_paddle_add` API,对输入 ``x`` 采用 Inplace 策略。
575575

576576
add_n(inputs, name=None)
577577
:::::::::
@@ -641,7 +641,7 @@ COPY-FROM: paddle.Tensor.apply
641641
apply_(callable)
642642
:::::::::
643643

644-
Inplace 版本的 `apply` API,对输入 `x` 采用 Inplace 策略。
644+
Inplace 版本的 ``apply`` API,对输入 ``x`` 采用 Inplace 策略。
645645

646646
argmax(axis=None, keepdim=False, dtype=int64, name=None)
647647
:::::::::
@@ -978,7 +978,7 @@ bincount(weights=None, minlength=0)
978978
bernoulli_(p=0.5, name=None)
979979
:::::::::
980980

981-
Inplace 版本的 :ref:`cn_api_paddle_bernoulli` API,对输入 `x` 采用 Inplace 策略。
981+
Inplace 版本的 :ref:`cn_api_paddle_bernoulli` API,对输入 ``x`` 采用 Inplace 策略。
982982

983983
bitwise_and(y, out=None, name=None)
984984
:::::::::
@@ -1072,7 +1072,7 @@ ceil(name=None)
10721072
ceil_(name=None)
10731073
:::::::::
10741074

1075-
Inplace 版本的 :ref:`cn_api_paddle_ceil` API,对输入 `x` 采用 Inplace 策略。
1075+
Inplace 版本的 :ref:`cn_api_paddle_ceil` API,对输入 ``x`` 采用 Inplace 策略。
10761076

10771077
cholesky(upper=False, name=None)
10781078
:::::::::
@@ -1123,7 +1123,7 @@ clip(min=None, max=None, name=None)
11231123
clip_(min=None, max=None, name=None)
11241124
:::::::::
11251125

1126-
Inplace 版本的 :ref:`cn_api_paddle_clip` API,对输入 `x` 采用 Inplace 策略。
1126+
Inplace 版本的 :ref:`cn_api_paddle_clip` API,对输入 ``x`` 采用 Inplace 策略。
11271127

11281128
clone()
11291129
:::::::::
@@ -1423,7 +1423,7 @@ exp(name=None)
14231423
exp_(name=None)
14241424
:::::::::
14251425

1426-
Inplace 版本的 :ref:`cn_api_paddle_exp` API,对输入 `x` 采用 Inplace 策略。
1426+
Inplace 版本的 :ref:`cn_api_paddle_exp` API,对输入 ``x`` 采用 Inplace 策略。
14271427

14281428
expand(shape, name=None)
14291429
:::::::::
@@ -1583,7 +1583,7 @@ fill_diagonal_tensor(x, y, offset=0, dim1=0, dim2=1, name=None)
15831583
fill_diagonal_tensor_(x, y, offset=0, dim1=0, dim2=1, name=None)
15841584
:::::::::
15851585

1586-
Inplace 版本的 :ref:`cn_api_paddle_fill_diagonal_tensor` API,对输入 `x` 采用 Inplace 策略。
1586+
Inplace 版本的 :ref:`cn_api_paddle_fill_diagonal_tensor` API,对输入 ``x`` 采用 Inplace 策略。
15871587

15881588
**代码示例**
15891589
.. code-block:: python
@@ -1606,7 +1606,7 @@ flatten(start_axis=0, stop_axis=-1, name=None)
16061606
flatten_(start_axis=0, stop_axis=-1, name=None)
16071607
:::::::::
16081608

1609-
Inplace 版本的 :ref:`cn_api_paddle_flatten` API,对输入 `x` 采用 Inplace 策略。
1609+
Inplace 版本的 :ref:`cn_api_paddle_flatten` API,对输入 ``x`` 采用 Inplace 策略。
16101610

16111611
flip(axis, name=None)
16121612
:::::::::
@@ -1638,7 +1638,7 @@ floor(name=None)
16381638
floor_(name=None)
16391639
:::::::::
16401640

1641-
Inplace 版本的 :ref:`cn_api_paddle_floor` API,对输入 `x` 采用 Inplace 策略。
1641+
Inplace 版本的 :ref:`cn_api_paddle_floor` API,对输入 ``x`` 采用 Inplace 策略。
16421642

16431643
floor_divide(y, name=None)
16441644
:::::::::
@@ -2055,7 +2055,7 @@ logsumexp(axis=None, keepdim=False, name=None)
20552055
log_normal_(mean=0.0, std=1.0, name=None)
20562056
:::::::::
20572057

2058-
Inplace 版本的 :ref:`cn_api_paddle_log_normal` API,对输入 `x` 采用 Inplace 策略。
2058+
Inplace 版本的 :ref:`cn_api_paddle_log_normal` API,对输入 ``x`` 采用 Inplace 策略。
20592059

20602060
请参考 :ref:`cn_api_paddle_logsumexp`
20612061

@@ -2385,7 +2385,7 @@ reciprocal(name=None)
23852385
reciprocal_(name=None)
23862386
:::::::::
23872387

2388-
Inplace 版本的 :ref:`cn_api_paddle_reciprocal` API,对输入 `x` 采用 Inplace 策略。
2388+
Inplace 版本的 :ref:`cn_api_paddle_reciprocal` API,对输入 ``x`` 采用 Inplace 策略。
23892389

23902390
register_hook(hook)
23912391
:::::::::
@@ -2462,7 +2462,7 @@ remainder_(y, name=None)
24622462

24632463
返回类型:Tensor
24642464

2465-
Inplace 版本的 :ref:`cn_api_paddle_remainder` API,对输入 `x` 采用 Inplace 策略。
2465+
Inplace 版本的 :ref:`cn_api_paddle_remainder` API,对输入 ``x`` 采用 Inplace 策略。
24662466

24672467
reshape(shape, name=None)
24682468
:::::::::
@@ -2485,7 +2485,7 @@ ravel()
24852485
reshape_(shape, name=None)
24862486
:::::::::
24872487

2488-
Inplace 版本的 :ref:`cn_api_paddle_reshape` API,对输入 `x` 采用 Inplace 策略
2488+
Inplace 版本的 :ref:`cn_api_paddle_reshape` API,对输入 ``x`` 采用 Inplace 策略
24892489

24902490
roll(shifts, axis=None, name=None)
24912491
:::::::::
@@ -2508,7 +2508,7 @@ round(name=None)
25082508
round_(name=None)
25092509
:::::::::
25102510

2511-
Inplace 版本的 :ref:`cn_api_paddle_round` API,对输入 `x` 采用 Inplace 策略。
2511+
Inplace 版本的 :ref:`cn_api_paddle_round` API,对输入 ``x`` 采用 Inplace 策略。
25122512

25132513
rsqrt(name=None)
25142514
:::::::::
@@ -2522,7 +2522,7 @@ rsqrt(name=None)
25222522
rsqrt_(name=None)
25232523
:::::::::
25242524

2525-
Inplace 版本的 :ref:`cn_api_paddle_rsqrt` API,对输入 `x` 采用 Inplace 策略。
2525+
Inplace 版本的 :ref:`cn_api_paddle_rsqrt` API,对输入 ``x`` 采用 Inplace 策略。
25262526

25272527
scale(scale=1.0, bias=0.0, bias_after_scale=True, act=None, name=None)
25282528
:::::::::
@@ -2536,7 +2536,7 @@ scale(scale=1.0, bias=0.0, bias_after_scale=True, act=None, name=None)
25362536
scale_(scale=1.0, bias=0.0, bias_after_scale=True, act=None, name=None)
25372537
:::::::::
25382538

2539-
Inplace 版本的 :ref:`cn_api_paddle_scale` API,对输入 `x` 采用 Inplace 策略。
2539+
Inplace 版本的 :ref:`cn_api_paddle_scale` API,对输入 ``x`` 采用 Inplace 策略。
25402540

25412541
scatter(index, updates, overwrite=True, name=None)
25422542
:::::::::
@@ -2550,7 +2550,7 @@ scatter(index, updates, overwrite=True, name=None)
25502550
scatter_(index, updates, overwrite=True, name=None)
25512551
:::::::::
25522552

2553-
Inplace 版本的 :ref:`cn_api_paddle_scatter` API,对输入 `x` 采用 Inplace 策略。
2553+
Inplace 版本的 :ref:`cn_api_paddle_scatter` API,对输入 ``x`` 采用 Inplace 策略。
25542554

25552555
scatter_add(index, updates, overwrite=True, name=None)
25562556
:::::::::
@@ -2761,7 +2761,7 @@ sqrt(name=None, \*, out=None)
27612761
sqrt_(name=None)
27622762
:::::::::
27632763

2764-
Inplace 版本的 :ref:`cn_api_paddle_sqrt` API,对输入 `x` 采用 Inplace 策略。
2764+
Inplace 版本的 :ref:`cn_api_paddle_sqrt` API,对输入 ``x`` 采用 Inplace 策略。
27652765

27662766
square(name=None)
27672767
:::::::::
@@ -2784,7 +2784,7 @@ squeeze(axis=None, name=None)
27842784
squeeze_(axis=None, name=None)
27852785
:::::::::
27862786

2787-
Inplace 版本的 :ref:`cn_api_paddle_squeeze` API,对输入 `x` 采用 Inplace 策略。
2787+
Inplace 版本的 :ref:`cn_api_paddle_squeeze` API,对输入 ``x`` 采用 Inplace 策略。
27882788

27892789
stack(axis=0, name=None)
27902790
:::::::::
@@ -2834,7 +2834,7 @@ subtract(y, name=None, \*, alpha=1, out=None)
28342834
subtract_(y, name=None, \*, alpha=1)
28352835
:::::::::
28362836

2837-
Inplace 版本的 :ref:`cn_api_paddle_subtract` API,对输入 `x` 采用 Inplace 策略。
2837+
Inplace 版本的 :ref:`cn_api_paddle_subtract` API,对输入 ``x`` 采用 Inplace 策略。
28382838

28392839
sub(y, name=None, \*, alpha=1, out=None)
28402840
:::::::::
@@ -2848,7 +2848,7 @@ sub(y, name=None, \*, alpha=1, out=None)
28482848
sub_(y, name=None, \*, alpha=1)
28492849
:::::::::
28502850

2851-
Inplace 版本的 :ref:`cn_api_paddle_sub` API,对输入 `x` 采用 Inplace 策略。
2851+
Inplace 版本的 :ref:`cn_api_paddle_sub` API,对输入 ``x`` 采用 Inplace 策略。
28522852

28532853
sum(axis=None, dtype=None, keepdim=False, name=None)
28542854
:::::::::
@@ -2898,7 +2898,7 @@ tanh(name=None)
28982898
tanh_(name=None)
28992899
:::::::::
29002900

2901-
Inplace 版本的 :ref:`cn_api_paddle_tan` API,对输入 `x` 采用 Inplace 策略。
2901+
Inplace 版本的 :ref:`cn_api_paddle_tan` API,对输入 ``x`` 采用 Inplace 策略。
29022902

29032903
tile(repeat_times, name=None)
29042904
:::::::::
@@ -3096,7 +3096,7 @@ unsqueeze(axis, name=None)
30963096
unsqueeze_(axis, name=None)
30973097
:::::::::
30983098

3099-
Inplace 版本的 :ref:`cn_api_paddle_unsqueeze` API,对输入 `x` 采用 Inplace 策略。
3099+
Inplace 版本的 :ref:`cn_api_paddle_unsqueeze` API,对输入 ``x`` 采用 Inplace 策略。
31003100

31013101
unstack(axis=0, num=None)
31023102
:::::::::
@@ -3119,16 +3119,16 @@ var(axis=None, unbiased=True, keepdim=False, name=None)
31193119
where(x, y, name=None)
31203120
:::::::::
31213121

3122-
调用该 `where` 方法的 `Tensor` 作为 `condition` 来选择 `x` 或 `y` 中的对应元素组成新的 `Tensor` 并返回。
3122+
调用该 ``where`` 方法的 ``Tensor`` 作为 ``condition`` 来选择 ``x`` 或 ``y`` 中的对应元素组成新的 ``Tensor`` 并返回。
31233123

31243124
返回:计算后的 Tensor
31253125

31263126
返回类型:Tensor
31273127

31283128
.. note::
3129-
只有 `bool` 类型的 `Tensor` 才能调用该方法。
3129+
只有 ``bool`` 类型的 ``Tensor`` 才能调用该方法。
31303130

3131-
示例:`(x>0).where(x, y)`, 其中 x, y 都是数值 `Tensor`。
3131+
示例:``(x>0).where(x, y)``, 其中 x, y 都是数值 ``Tensor``。
31323132

31333133
请参考 :ref:`cn_api_paddle_where`
31343134

@@ -3173,7 +3173,7 @@ lerp(x, y, weight, name=None)
31733173
lerp_(y, weight, name=None)
31743174
:::::::::
31753175

3176-
Inplace 版本的 :ref:`cn_api_paddle_lerp` API,对输入 `x` 采用 Inplace 策略。
3176+
Inplace 版本的 :ref:`cn_api_paddle_lerp` API,对输入 ``x`` 采用 Inplace 策略。
31773177

31783178

31793179
is_complex()
@@ -3357,7 +3357,7 @@ nnz()
33573357
:::::::::
33583358

33593359
.. note::
3360-
只有 `SparseCooTensor` 、`SparseCsrTensor` 才可调用该方法。
3360+
只有 ``SparseCooTensor`` 、``SparseCsrTensor`` 才可调用该方法。
33613361

33623362
返回:输入稀疏 Tensor 的非 0 元素的个数
33633363

@@ -3380,7 +3380,7 @@ indices()
33803380
:::::::::
33813381

33823382
.. note::
3383-
只有 `SparseCooTensor` 才可调用该方法。
3383+
只有 ``SparseCooTensor`` 才可调用该方法。
33843384

33853385
返回:输入 SparseCooTensor 的非 0 元素的索引
33863386

@@ -3405,7 +3405,7 @@ values()
34053405
:::::::::
34063406

34073407
.. note::
3408-
只有 `SparseCooTensor` 才可调用该方法。
3408+
只有 ``SparseCooTensor`` 才可调用该方法。
34093409

34103410
返回:输入 SparseCooTensor 的非 0 元素的值
34113411

@@ -3430,7 +3430,7 @@ crows()
34303430
:::::::::
34313431

34323432
.. note::
3433-
只有 `SparseCsrTensor` 才可调用该方法。
3433+
只有 ``SparseCsrTensor`` 才可调用该方法。
34343434

34353435
返回:输入 SparseCsrTensor 的非 0 元素的压缩行信息
34363436

@@ -3455,7 +3455,7 @@ cols()
34553455
:::::::::
34563456

34573457
.. note::
3458-
只有 `SparseCsrTensor` 才可调用该方法。
3458+
只有 ``SparseCsrTensor`` 才可调用该方法。
34593459

34603460
返回:输入 SparseCsrTensor 的非 0 元素的列信息
34613461

@@ -3548,7 +3548,7 @@ to_sparse_csr()
35483548
:::::::::
35493549

35503550
.. note::
3551-
只有 `DenseTensor` 、`SparseCooTensor` 才可调用该方法。
3551+
只有 ``DenseTensor`` 、``SparseCooTensor`` 才可调用该方法。
35523552

35533553
将输入 Tensor 转换为 SparseCsrTensor。
35543554

@@ -3689,7 +3689,7 @@ masked_fill(x, mask, value, name=None)
36893689
masked_fill_(x, mask, value, name=None)
36903690
:::::::::
36913691

3692-
Inplace 版本的 :ref:`cn_api_paddle_masked_fill` API,对输入 `x` 采用 Inplace 策略。
3692+
Inplace 版本的 :ref:`cn_api_paddle_masked_fill` API,对输入 ``x`` 采用 Inplace 策略。
36933693

36943694
masked_scatter(x, mask, value, name=None)
36953695
:::::::::
@@ -3702,7 +3702,7 @@ masked_scatter(x, mask, value, name=None)
37023702
masked_scatter_(x, mask, value, name=None)
37033703
:::::::::
37043704

3705-
Inplace 版本的 :ref:`cn_api_paddle_masked_scatter` API,对输入 `x` 采用 Inplace 策略。
3705+
Inplace 版本的 :ref:`cn_api_paddle_masked_scatter` API,对输入 ``x`` 采用 Inplace 策略。
37063706

37073707
atleast_1d(name=None)
37083708
:::::::::
@@ -3751,7 +3751,7 @@ select_scatter(x, values, axis, index, name=None)
37513751
slice_scatter(value, axes, starts, ends, strides, name=None)
37523752
:::::::::
37533753

3754-
沿着 `axes` 将 `value` 矩阵的值嵌入到 `x` 矩阵。返回一个新的 Tensor 而不是视图。
3754+
沿着 ``axes`` 将 ``value`` 矩阵的值嵌入到 ``x`` 矩阵。返回一个新的 Tensor 而不是视图。
37553755

37563756
返回:计算后的 Tensor
37573757

@@ -3773,7 +3773,7 @@ signbit(x, name=None)
37733773
block_diag(inputs, name=None)
37743774
:::::::::
37753775

3776-
根据 `inputs` 创建对角矩阵。
3776+
根据 ``inputs`` 创建对角矩阵。
37773777

37783778
返回:对角矩阵 Tensor。
37793779

docs/api/paddle/addmm__cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ addmm\_
44
-------------------------------
55

66
.. py:function:: paddle.addmm_(input, x, y, beta=1.0, alpha=1.0, name=None)
7-
Inplace 版本的 :ref:`cn_api_paddle_addmm` API,对输入 `input` 采用 Inplace 策略。
7+
Inplace 版本的 :ref:`cn_api_paddle_addmm` API,对输入 ``input`` 采用 Inplace 策略。
88

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

docs/api/paddle/amp/debugging/DebugMode_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DebugMode
55

66
.. py:class:: paddle.amp.debugging.DebugMode()
77
8-
`DebugMode` 用于标识 `TensorCheckerConfig` 的状态。每个 `DebugMode` 的含义如下:
8+
``DebugMode`` 用于标识 ``TensorCheckerConfig`` 的状态。每个 ``DebugMode`` 的含义如下:
99

1010
- **DebugMode.CHECK_NAN_INF_AND_ABORT** - 打印或保存带有 NaN/Inf 的 Tensor 关键信息并中断程序。
1111

docs/api/paddle/amp/debugging/compare_accuracy_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ compare_accuracy
44
-------------------------------
55
.. py:function:: paddle.amp.debugging.compare_accuracy(dump_path, another_dump_path, output_filename, loss_scale=1, dump_all_tensors=False)
66
7-
`compare_accuracy` 是一个精度比对的工具,可以用来比较 float16 和 float32 的 log 数据。
7+
``compare_accuracy`` 是一个精度比对的工具,可以用来比较 float16 和 float32 的 log 数据。
88

99
参数
1010
:::::::::

docs/api/paddle/as_tensor_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ as_tensor
55

66
.. py:function:: paddle.as_tensor(data, dtype=None, device=None, requires_grad=False, pin_memory=False)
77
8-
`paddle.tensor` 的别名,详细参考 :ref:`cn_api_paddle_tensor`。
8+
``paddle.tensor`` 的别名,详细参考 :ref:`cn_api_paddle_tensor`。

docs/api/paddle/atan2_cn.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
atan2
44
-------------------------------
55

6-
.. py:function:: paddle.atan2(x, y, name=None)
6+
.. py:function:: paddle.atan2(x, y, name=None, *, out=None)
77
88
99
@@ -23,10 +23,14 @@ atan2
2323
参数
2424
:::::::::
2525

26-
- **x** (Tensor) - 输入的 Tensor,数据类型为:int32、int64、float16、float32、float64。
27-
- **y** (Tensor) - 输入的 Tensor,数据类型为:int32、int64、float16、float32、float64。
26+
- **x** (Tensor) - 输入的 Tensor,数据类型为:int32、int64、float16、float32、float64。别名 ``input`` 。
27+
- **y** (Tensor) - 输入的 Tensor,数据类型为:int32、int64、float16、float32、float64。别名 ``other`` 。
2828
- **name** (str,可选) - 操作的名称(可选,默认值为 None)。更多信息请参见 :ref:`api_guide_Name`。
2929

30+
关键字参数
31+
:::::::::
32+
- **out** (Tensor,可选) - 输出 Tensor,若不为 ``None``,计算结果将保存在该 Tensor 中,默认值为 ``None``。
33+
3034
返回
3135
:::::::::
3236

0 commit comments

Comments
 (0)