invert

dragon.bitwise.invert(
  inputs,
  **kwargs
)[source]

Invert each bit of input.

\[\text{out} = \,\,\sim x \]

Examples:

# Typically, ``x`` is a bool tensor
print(dragon.bitwise.invert(dragon.constant([0, 1], 'bool')))  # [True, False]

# Otherwise, integral types are required (unsigned or signed)
# 00001101 (13) -> 11110010 (?)
print(dragon.bitwise.invert(dragon.constant(13, 'uint8')))  # 242
print(dragon.bitwise.invert(dragon.constant(13, 'int8')))   # -14
Parameters:
Returns:

dragon.Tensor – The output tensor.