Skip to content

Commit 093dc0d

Browse files
[Docs] Batch fix single-backtick inline literals in API CN docs (#7869)
Co-authored-by: ooo oo <106524776+ooooo-create@users.noreply.github.com>
1 parent b11d603 commit 093dc0d

97 files changed

Lines changed: 271 additions & 271 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/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/atleast_2d_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ atleast_2d
77
88
将输入转换为张量并返回至少为 ``2`` 维的视图。 ``2`` 维或更高维的输入会被保留。
99

10-
下图分别展示了 `atleast_2d` 在不同数据类型下,对 1 个 `0` 维张量输入、1 个 `0` 维张量输入和 1 个 `1` 维张量输入,以及 1 个 `0` 维张量输入和 1 个 `3` 维张量输入,将其返回为至少为 `2` 维视图的张量或张量 list 的情形。
10+
下图分别展示了 ``atleast_2d`` 在不同数据类型下,对 1 个 ``0`` 维张量输入、1 个 ``0`` 维张量输入和 1 个 ``1`` 维张量输入,以及 1 个 ``0`` 维张量输入和 1 个 ``3`` 维张量输入,将其返回为至少为 ``2`` 维视图的张量或张量 list 的情形。
1111

1212
.. image:: ../../images/api_legend/atleast_2d.png
1313
:width: 600

docs/api/paddle/cdist_cn.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ cdist
77
88
计算两组输入集合中每对之间的 p 范数距离。
99

10-
:math:`p \in (0, \infty)` 时,该函数等同于 `scipy.spatial.distance.cdist(input,'minkowski', p=p)` ;
11-
:math:`p = 0` 时,等同于 `scipy.spatial.distance.cdist(input, 'hamming') * M` ;
12-
:math:`p = \infty` 时,最接近的是 `scipy.spatial.distance.cdist(xn, lambda x, y: np.abs(x - y).max())` 。
10+
:math:`p \in (0, \infty)` 时,该函数等同于 ``scipy.spatial.distance.cdist(input,'minkowski', p=p)`` ;
11+
:math:`p = 0` 时,等同于 ``scipy.spatial.distance.cdist(input, 'hamming') * M`` ;
12+
:math:`p = \infty` 时,最接近的是 ``scipy.spatial.distance.cdist(xn, lambda x, y: np.abs(x - y).max())`` 。
1313

1414
参数
1515
::::::::::::
@@ -28,7 +28,7 @@ cdist
2828

2929
返回
3030
::::::::::::
31-
Tensor,`dtype` 与输入张量相同。
31+
Tensor,``dtype`` 与输入张量相同。
3232
如果 x 的形状为 :math:`B \times P \times M`,y 的形状为 :math:`B \times R \times M`,则输出的形状为 :math:`B \times P \times R`。
3333

3434
代码示例

docs/api/paddle/combinations_cn.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ combinations
55

66
.. py:function:: paddle.combinations(x, r=2, with_replacement=False, name=None)
77
8-
对输入 Tensor 计算长度为 r 的情况下的所有组合,当 `with_replacement` 设为 False,可类比 python 内置 API `itertools.combinations` 。
9-
当 `with_replacement` 设为 True,可类比 python 内置 API `itertools.combinations_with_replacement(with_replacement=True)`。
8+
对输入 Tensor 计算长度为 r 的情况下的所有组合,当 ``with_replacement`` 设为 False,可类比 python 内置 API ``itertools.combinations`` 。
9+
当 ``with_replacement`` 设为 True,可类比 python 内置 API ``itertools.combinations_with_replacement(with_replacement=True)``。
1010

1111
参数
1212
::::::::::

docs/api/paddle/compat/Overview_cn.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ PyTorch 兼容函数
1414
:header: "API 名称", "API 功能"
1515
:widths: 10, 30
1616

17-
" :ref:`max <cn_api_paddle_compat_max>` ", "包含 `amax`、同时返回 values 及 indices 的轴向最大值、`maximum` 三种功能"
17+
" :ref:`max <cn_api_paddle_compat_max>` ", "包含 ``amax``、同时返回 values 及 indices 的轴向最大值、``maximum`` 三种功能"
1818
" :ref:`median <cn_api_paddle_compat_median>` ", "兼容版中位数,支持 dim/keepdim/out 签名"
19-
" :ref:`min <cn_api_paddle_compat_min>` ", "包含 `amin`、同时返回 values 及 indices 的轴向最小值、`minimum` 三种功能"
19+
" :ref:`min <cn_api_paddle_compat_min>` ", "包含 ``amin``、同时返回 values 及 indices 的轴向最小值、``minimum`` 三种功能"
2020
" :ref:`nanmedian <cn_api_paddle_compat_nanmedian>` ", "忽略 NaN 的兼容版中位数,支持 dim/keepdim/out 签名"
2121
" :ref:`slogdet <cn_api_paddle_compat_slogdet>` ", "slogdet 函数"
2222
" :ref:`sort <cn_api_paddle_compat_sort>` ", "同时返回 values 及 indices 的排序"

docs/api/paddle/diagonal_cn.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ diagonal
66
.. py:function:: paddle.diagonal(x, offset=0, axis1=0, axis2=1, name=None)
77
88
9-
根据参数 `offset`、`axis1`、`axis2`,返回输入 `Tensor` 的局部视图。
9+
根据参数 ``offset``、``axis1``、``axis2``,返回输入 ``Tensor`` 的局部视图。
1010

1111
如果输入是 2D Tensor,则返回对角线元素。
1212

1313
如果输入的维度大于 2D,则返回由对角线元素组成的数组,其中对角线从由 axis1 和 axis2 指定的二维平面中获得。默认由输入的前两维组成获得对角线的 2D 平面。
1414

15-
参数 `offset` 确定从指定的二维平面中获取对角线的位置:
15+
参数 ``offset`` 确定从指定的二维平面中获取对角线的位置:
1616

1717
- 如果 offset = 0,则取主对角线。
1818
- 如果 offset > 0,则取主对角线右上的对角线。

0 commit comments

Comments
 (0)