Skip to content

Commit cdc62a2

Browse files
authored
[Docathon][Add Inplace CN Doc No.8] (#7268)
* cast__cn.rst * Update cast__cn.rst * fix the doc * fix nbsp
1 parent b649cf9 commit cdc62a2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/api/paddle/Overview_cn.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ tensor 元素操作相关原位(inplace)版本
547547
:header: "API 名称", "API 功能"
548548
:widths: 10, 30
549549

550+
" :ref:`paddle.cast_ <cn_api_paddle_cast_>` ", "Inplace 版本的 cast API,对输入 x 采用 Inplace 策略"
550551
" :ref:`paddle.index_add_ <cn_api_paddle_index_add_>` ", "Inplace 版本的 :ref:`cn_api_paddle_index_add` API,对输入 `x` 采用 Inplace 策略"
551552
" :ref:`paddle.index_put_ <cn_api_paddle_index_put_>` ", "依据索引 ``indices`` ,将指定位置的 ``x`` 重新赋值为 ``value`` "
552553
" :ref:`paddle.reshape_ <cn_api_paddle_reshape_>` ", "Inplace 版本的 reshape API,对输入 x 采用 Inplace 策略"

docs/api/paddle/cast__cn.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. _cn_api_paddle_cast_:
2+
3+
cast\_
4+
-------------------------------
5+
6+
.. py:function:: paddle.cast_(x, dtype)
7+
Inplace 版本的 :ref:`cn_api_paddle_cast` 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)