bitwise_xor

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

Compute the element-wise XOR bitwise operation.

\[\text{out} = \text{input1} \oplus \text{input2} \]

Examples:

a = dragon.constant([0, -1, 2, -3, 4])
b = dragon.constant([-4, 3, -2, 1, 0])
print(dragon.bitwise.bitwise_xor([a, b]))  # [-4, -4, -4, -4, 4]
Parameters:
  • inputs (Sequence[dragon.Tensor]) – The input1 and input2 tensor.
Returns:

dragon.Tensor – The output tensor.