Xor#
Domain:
ai.onnxSince version: 7
Returns the tensor resulted from performing the Xor logical operation
elementwise on the input tensors A and B (with Numpy-style broadcasting support).
Inputs
A (T): First input operand for the logical operator.
B (T): Second input operand for the logical operator.
Outputs
C (T1): Result tensor.
Type Constraints
T: Constrain input to boolean tensor. Allowed types: tensor(bool).
T1: Constrain output to boolean tensor. Allowed types: tensor(bool).
Examples#
test_cc_xor
Inputs:
x: shape=(2, 2), dtype=bool
[[ True, False],
[ True, False]]
y: shape=(2, 2), dtype=bool
[[ True, True],
[False, False]]
Outputs:
z: shape=(2, 2), dtype=bool
[[False, True],
[ True, False]]
test_cc_xor_bcast
Inputs:
x: shape=(2, 2), dtype=bool
[[ True, False],
[ True, False]]
y: shape=(), dtype=bool
True
Outputs:
z: shape=(2, 2), dtype=bool
[[False, True],
[False, True]]
Differences with previous version (1)#
SchemaDiff: Xor (domain 'ai.onnx')
old version: 1
new version: 7
breaking: no
Documentation:
line similarity: 0.40 (+1/-5 lines)
--- Xor v1
+++ Xor v7
@@ -1,7 +1,3 @@
Returns the tensor resulted from performing the `Xor` logical operation
-elementwise on the input tensors `A` and `B`.
-
-If broadcasting is enabled, the right-hand-side argument will be broadcasted
-to match the shape of left-hand-side argument. See the doc of `Add` for a
-detailed description of the broadcasting rules.
+elementwise on the input tensors `A` and `B` (with Numpy-style broadcasting support).