forked from PaddlePaddle/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
【Hackathon 6th No.10】Add isposinf / isneginf / isreal API to Paddle -…
… part (PaddlePaddle#6615) * add hack10 part * update Tensor_cn.rst
- Loading branch information
Showing
6 changed files
with
101 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,6 +154,9 @@ Methods | |
isfinite | ||
isinf | ||
isnan | ||
isneginf | ||
isposinf | ||
isreal | ||
item | ||
kron | ||
less_equal | ||
|
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,22 @@ | ||
.. _cn_api_paddle_isneginf: | ||
|
||
isneginf | ||
----------------------------- | ||
|
||
.. py:function:: paddle.isneginf(x, name=None) | ||
返回输入 tensor 的每一个值是否为 `-INF` 。 | ||
|
||
参数 | ||
::::::::: | ||
- **x** (Tensor):输入的 `Tensor`,数据类型为:float16、float32、float64、int8、int16、int32、int64、uint8。 | ||
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||
|
||
返回 | ||
::::::::: | ||
``Tensor``,每个元素是一个 bool 值,表示输入 `x` 的每个元素是否为 `-INF` 。 | ||
|
||
代码示例 | ||
::::::::: | ||
|
||
COPY-FROM: paddle.isneginf |
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,22 @@ | ||
.. _cn_api_paddle_isposinf: | ||
|
||
isposinf | ||
----------------------------- | ||
|
||
.. py:function:: paddle.isposinf(x, name=None) | ||
返回输入 tensor 的每一个值是否为 `+INF` 。 | ||
|
||
参数 | ||
::::::::: | ||
- **x** (Tensor):输入的 `Tensor`,数据类型为:float16、float32、float64、int8、int16、int32、int64、uint8。 | ||
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||
|
||
返回 | ||
::::::::: | ||
``Tensor``,每个元素是一个 bool 值,表示输入 `x` 的每个元素是否为 `+INF` 。 | ||
|
||
代码示例 | ||
::::::::: | ||
|
||
COPY-FROM: paddle.isposinf |
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,24 @@ | ||
.. _cn_api_paddle_isreal: | ||
|
||
isreal | ||
------------------------------- | ||
|
||
.. py:function:: paddle.isreal(x, name=None) | ||
判断输入 tensor 的每一个值是否为实数类型(非 complex64 或者 complex128)。 | ||
|
||
参数 | ||
::::::::: | ||
- **x** (Tensor) - 输入 Tensor。 | ||
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||
|
||
返回 | ||
::::::::: | ||
``Tensor``,每个元素是一个 bool 值,表示输入 `x` 的每个元素是否为实数类型。 | ||
|
||
|
||
代码示例 | ||
::::::::: | ||
|
||
COPY-FROM: paddle.isreal |