mindspore/docs/api/api_python/ops/mindspore.ops.func_intopk.rst

14 lines
479 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.intopk
====================
.. py:function:: mindspore.ops.intopk(x1, x2, k)
返回第二个输入tensor中的元素是否存在于第一个输入tensor的前 `k` 个元素中。
参数:
- **x1** (Tensor) - 二维输入tensor。
- **x2** (Tensor) - 一维输入tensor。须满足 :math:`x2.shape[0] = x1.shape[0]`
- **k** (int) - 前 `k` 个元素。
返回:
一维的bool类型tensor`x2` shape相同。