mindspore.Tensor.count_nonzero

View Source On Gitee
Tensor.count_nonzero(axis=(), keep_dims=False, dtype=mstype.int32)[source]

For details, please refer to mindspore.ops.count_nonzero().