mindspore/docs/api/api_python/ops/mindspore.ops.CheckNumerics...

17 lines
522 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.CheckNumerics
===========================
.. py:class:: mindspore.ops.CheckNumerics
检查Tensor的NaN和Inf值。
输入:
- **x** (Tensor) - 任意维度的Tensor。数据类型为float16、float32或float64。
输出:
Tensor如果 `x` 中没有nan或inf值则具有与 `x` 相同的shape和数据类型。
异常:
- **TypeError** - `x` 数据类型不是float16、float32或float64。
- **RuntimeError** - `x` 的中存在nan或者inf值。