mindspore.mint.isneginf
- mindspore.mint.isneginf(input)[source]
Determines which elements are -inf for each position.
Warning
This is an experimental API that is subject to change.
This API can be used only on the Atlas A2 training series.
- Parameters
input (Tensor) – Input Tensor.
- Returns
Tensor with the same shape as the input, where elements are True if the corresponding element in the input is negative infinity, and False otherwise.
- Raises
TypeError – If the input is not a tensor.
- Supported Platforms:
Ascend
Examples
>>> from mindspore import mint, Tensor >>> from mindspore import dtype as mstype >>> output = mint.isneginf(Tensor([[-float("inf"), float("inf")], [1, -float("inf")]], mstype.float32)) >>> print(output) [[ True False] [False True]]