Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
【PaddlePaddle Hackathon 3 No.14】为 Paddle 新增 remainder_ API (#5156)
* add remainder_ docs * modified * modified * modified * modified * modified * Update docs/api/paddle/remainder__cn.rst Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com> * Update docs/api/api_label Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com> * Update docs/api/paddle/remainder__cn.rst Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com> * modified * modified * modified * modified * modified * modified * modified * modified * modified Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
- Loading branch information
Showing
6 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.. _cn_api_tensor_remainder_: | ||
|
||
remainder\_ | ||
------------------------------- | ||
|
||
.. py:function:: paddle.remainder_(x, y, name=None) | ||
Inplace 版本的 :ref:`cn_api_tensor_remainder` API,对输入 `x` 采用 Inplace 策略。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.. _cn_api_tensor_remainder: | ||
|
||
remainder | ||
------------------------------- | ||
|
||
.. py:function:: paddle.remainder(x, y, name=None) | ||
逐元素取模算子。公式为: | ||
|
||
.. math:: | ||
\\out = x \% y\\ | ||
.. note:: | ||
``paddle.remainder`` 支持广播,如您想了解更多,请参见 :ref:`cn_user_guide_broadcasting` 。 | ||
|
||
参数 | ||
::::::::: | ||
|
||
- **x** (Tensor) - 多维 Tensor。数据类型为 float32 、float64、int32 或 int64。 | ||
- **y** (Tensor) - 多维 Tensor。数据类型为 float32 、float64、int32 或 int64。 | ||
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name` ,一般无需设置,默认值为 None。 | ||
|
||
返回 | ||
::::::::: | ||
``Tensor``,存储运算后的结果。如果 x 和 y 有不同的 shape 且是可以广播的,返回 Tensor 的 shape 是 x 和 y 经过广播后的 shape。如果 x 和 y 有相同的 shape,返回 Tensor 的 shape 与 x,y 相同。 | ||
|
||
代码示例 | ||
::::::::: | ||
|
||
COPY-FROM: paddle.remainder |