mindspore.ops.Invert
- class mindspore.ops.Invert[source]
Flips all bits of input tensor element-wise.
Refer to
mindspore.ops.invert()
for more details.- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> import numpy as np >>> from mindspore import Tensor, ops >>> invert = ops.Invert() >>> x = Tensor(np.array([25, 4, 13, 9]), mindspore.int16) >>> output = invert(x) >>> print(output) [-26 -5 -14 -10]