mindspore.ops.invert
- mindspore.ops.invert(x)[source]
Flip all bits of input tensor element-wise. For example, 01010101 becomes 10101010.
- Parameters
x (Tensor) – The input tensor.
- Returns
Tensor
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> mindspore.ops.invert(mindspore.tensor([25, 4, 13, 9], mindspore.int16)) Tensor(shape=[4], dtype=Int16, value= [-26, -5, -14, -10])