tf.logical_xor

tf.logical_xor(
    x,
    y,
    name='LogicalXor'
)

Defined in tensorflow/python/ops/math_ops.py.

See the guide: Control Flow > Logical Operators

x ^ y = (x | y) & ~(x & y).