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
>>> from mindspore.ops.operations.math_ops import Invert >>> invert = Invert() >>> x = Tensor(np.array([25, 4, 13, 9]), mindspore.int16) >>> output = invert(x) >>> print(output) [-26 -5 -14 -10]