逐元素按位翻转。如:01010101 变为 10101010。
x (Tensor) - 输入tensor。
Tensor
Ascend GPU CPU
Ascend
GPU
CPU
样例:
>>> import mindspore >>> mindspore.ops.invert(mindspore.tensor([25, 4, 13, 9])) Tensor(shape=[4], dtype=Int64, value= [-26, -5, -14, -10])