mindspore/docs/api/api_python/ops/mindspore.ops.UniqueWithPad...

13 lines
651 B
ReStructuredText
Raw 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.UniqueWithPad
===========================
.. py:class:: mindspore.ops.UniqueWithPad
对输入一维张量中元素去重返回一维张量中的唯一元素使用pad_num填充和相对索引。
基本操作与Unique相同但UniqueWithPad多了Pad操作。
Unique运算符处理输入张量 `x` 后所返回的元组( `y` `idx` `y``idx` 的shape通常会有差别因此为了解决上述情况
UniqueWithPad操作符将用用户指定的 `pad_num` 填充 `y` 张量,使其具有与张量 `idx` 相同的形状。
更多参考详见 :func:`mindspore.ops.unique_with_pad`