mindspore/docs/api/api_python/ops/mindspore.ops.func_isinf.rst

24 lines
689 B
ReStructuredText
Raw Normal View History

2022-11-12 05:15:26 +08:00
mindspore.ops.isinf
===================
.. py:function:: mindspore.ops.isinf(input)
确定输入Tensor每个位置上的元素是否为无穷大或无穷小。
.. math::
out_i = \begin{cases}
& \text{ if } x_{i} = \text{Inf},\ \ True \\
& \text{ if } x_{i} \ne \text{Inf},\ \ False
\end{cases}
其中 :math:`Inf` 表示不是一个数字。
参数:
- **input** (Tensor) - IsInf的输入shape :math:`(N, *)` ,其中 :math:`*` 表示任意数量的附加维度。
返回:
Tensorshape与相同的输入数据的类型为bool。
异常:
- **TypeError** - 如果 `input` 不是Tensor。