logical_xor

dragon.math.logical_xor(
  inputs,
  **kwargs
)[source]

Compute the element-wise XOR logical operation.

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

Examples:

a = dragon.constant([False, True, False, True])
b = dragon.constant([False, True, True, False])
c = dragon.constant([0, 1, 0, 2])
d = dragon.constant([0, 3, 4, 0])
print(dragon.math.logical_xor([a, b]))  # [False, False, True, True]
print(dragon.math.logical_xor([c, d]))  # [False, False, True, True]
Parameters:
  • inputs (Sequence[dragon.Tensor]) – The input1 and input2 tensor.
Returns:

dragon.Tensor – The output tensor.