Skip to content

Commit da440cb

Browse files
authored
[Docathon][Add Inplace CN Doc No.44、45、46、47] (#7151)
1 parent e4dd48b commit da440cb

File tree

5 files changed

+69
-0
lines changed

5 files changed

+69
-0
lines changed

docs/api/paddle/Overview_cn.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ paddle 目录下包含 tensor、device、framework 相关 API 以及某些高层
1111
- :ref:`tensor 属性相关 <tensor_attribute>`
1212
- :ref:`tensor 创建相关 <tensor_creation>`
1313
- :ref:`tensor 元素查找相关 <tensor_search>`
14+
- :ref:`tensor 元素查找相关原位(inplace)版本 <tensor_search_inplace>`
1415
- :ref:`tensor 初始化相关 <tensor_initializer>`
1516
- :ref:`tensor random 相关 <tensor_random>`
1617
- :ref:`tensor 线性代数相关 <tensor_linalg>`
18+
- :ref:`tensor 线性代数相关原位(inplace)版本 <tensor_linalg_inplace>`
1719
- :ref:`tensor 元素操作相关(如:转置,reshape 等) <tensor_manipulation>`
1820
- :ref:`tensor 元素操作相关原位(inplace)版本 <tensor_manipulation_inplace>`
1921
- :ref:`爱因斯坦求和 <einsum>`
@@ -341,6 +343,17 @@ tensor 元素查找相关
341343
" :ref:`paddle.topk <cn_api_paddle_topk>` ", "沿着可选的 axis 查找 topk 最大或者最小的结果和结果所在的索引信息"
342344
" :ref:`paddle.where <cn_api_paddle_where>` ", "返回一个根据输入 condition, 选择 x 或 y 的元素组成的多维 Tensor"
343345

346+
.. _tensor_search_inplace:
347+
348+
tensor 元素查找相关原位(inplace)版本
349+
::::::::::::::::::::
350+
351+
.. csv-table::
352+
:header: "API 名称", "API 功能"
353+
:widths: 10, 30
354+
355+
" :ref:`paddle.where_ <cn_api_paddle_where_>` ", "Inplace 版本的 where API,对输入 x 采用 Inplace 策略"
356+
344357
.. _tensor_initializer:
345358

346359
tensor 初始化相关
@@ -405,6 +418,18 @@ tensor 线性代数相关
405418
" :ref:`paddle.pdist <cn_api_paddle_pdist>` ", "计算输入形状为 N x M 的 Tensor 中 N 个向量两两组合(pairwise)的 p 范数"
406419
" :ref:`paddle.renorm <cn_api_paddle_renorm>` ", "计算沿轴的 p 范数"
407420

421+
.. _tensor_linalg_inplace:
422+
423+
tensor 线性代数相关原位(inplace)版本
424+
::::::::::::::::::::
425+
426+
.. csv-table::
427+
:header: "API 名称", "API 功能"
428+
:widths: 10, 30
429+
430+
" :ref:`paddle.tril_ <cn_api_paddle_tril_>` ", "Inplace 版本的 tril API,对输入 x 采用 Inplace 策略"
431+
" :ref:`paddle.triu_ <cn_api_paddle_triu_>` ", "Inplace 版本的 triu API,对输入 x 采用 Inplace 策略"
432+
" :ref:`paddle.trunc_ <cn_api_paddle_trunc_>` ", "Inplace 版本的 trunc API,对输入 x 采用 Inplace 策略"
408433

409434
.. _tensor_manipulation:
410435

docs/api/paddle/tril__cn.rst

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

docs/api/paddle/triu__cn.rst

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

docs/api/paddle/trunc__cn.rst

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

docs/api/paddle/where__cn.rst

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

0 commit comments

Comments
 (0)