Implementing kernel
C++ engine symbols that back this Python API.Element-wise bitwise XOR.
Element-wise bitwise operation on integer (or boolean) operands. For boolean inputs this reduces to the corresponding logical operation. Floating-point inputs are not supported and will raise.
Parameters
Returns
TensorTensor with shape broadcast(input.shape, other.shape) and dtype given
by the usual integer type-promotion rules.
Notes
Bit-level definition (for each bit position k of every element):
For boolean tensors this is the same as logical_xor. Bitwise operations are not differentiable; gradients are dropped.
Examples
>>> import lucid
>>> a = lucid.tensor([0b1100, 0b1010], dtype=lucid.int32)
>>> b = lucid.tensor([0b1010, 0b0110], dtype=lucid.int32)
>>> lucid.bitwise_xor(a, b)
Tensor([...])