mindspore.mint.any
- mindspore.mint.any(input) Tensor [source]
Check if
True
is present in input .- Parameters
input (Tensor) – The input tensor.
- Returns
Tensor
- Supported Platforms:
Ascend
Examples
>>> import mindspore >>> input = mindspore.tensor([[True, False], [True, True]]) >>> mindspore.mint.any(input) Tensor(shape=[], dtype=Bool, value= True)
Check if
True
is present in the specified dimension of input .- Parameters
- Returns
Tensor
- Supported Platforms:
Ascend
Examples
>>> import mindspore >>> input = mindspore.tensor([[True, False], [True, True]]) >>> mindspore.mint.any(input, dim=1) Tensor(shape=[2], dtype=Bool, value= [ True, True])