2022-04-16 17:16:29 +08:00
|
|
|
|
mindspore.ops.isnan
|
|
|
|
|
|
====================
|
|
|
|
|
|
|
|
|
|
|
|
.. py:function:: mindspore.ops.isnan(x)
|
|
|
|
|
|
|
|
|
|
|
|
判断输入数据每个位置上的值是否是Nan。
|
|
|
|
|
|
|
|
|
|
|
|
.. math::
|
|
|
|
|
|
|
|
|
|
|
|
out_i = \begin{cases}
|
|
|
|
|
|
& \text{ if } x_{i} = \text{Nan},\ \ True \\
|
|
|
|
|
|
& \text{ if } x_{i} \ne \text{Nan},\ \ False
|
|
|
|
|
|
\end{cases}
|
|
|
|
|
|
|
|
|
|
|
|
其中 :math:`Nan` 表示的不是number。
|
|
|
|
|
|
|
2022-07-25 17:18:38 +08:00
|
|
|
|
参数:
|
|
|
|
|
|
- **x** (Tensor) - IsNan的输入,任意维度的Tensor。
|
2022-04-16 17:16:29 +08:00
|
|
|
|
|
2022-07-25 17:18:38 +08:00
|
|
|
|
返回:
|
|
|
|
|
|
Tensor,输出的shape与输入相同,数据类型为bool。
|
2022-04-16 17:16:29 +08:00
|
|
|
|
|
2022-07-25 17:18:38 +08:00
|
|
|
|
异常:
|
|
|
|
|
|
- **TypeError** - `x` 不是Tensor。
|