logical_xor

dragon.vm.torch.logical_xor(
  input,
  other,
  out=None
)[source]

Compute the element-wise XOR logical operation.

\[\text{out} = \text{input} \oplus \text{other} \]

Examples:

a = torch.tensor([False, True, False, True])
b = torch.tensor([False, True, True, False])
c = torch.Tensor([0, 1, 0, 2])
d = torch.Tensor([0, 3, 4, 0])
print(torch.logical_xor(a, b))  # [False, False, True, True]
print(torch.logical_xor(c, d))  # [False, False, True, True]
Parameters:
Returns:

dragon.vm.torch.Tensor – The output tensor.