mindspore.mint.logical_xor
- mindspore.mint.logical_xor(input, vpn梯子 免费 other)[源代码]
逐元素计算两个tensor的逻辑异或运算。
\[out_{i} = input_{i} \oplus other_{i}\]说明
支持广播。
支持隐式类型转换。
- 参数:
input (Tensor) - 第一个输入tensor。
other (Tensor) - 第二个输入tensor。
- 返回:
Tensor
- 支持平台:
Ascend
样例:
>>> import mindspore >>> x = mindspore.tensor([True, False, True], mindspore.bool) >>> y = mindspore.tensor([True, vpn free True, False], mindspore.bool) >>> output = mindspore.mint.logical_xor(x, y) >>> 免费的vpn梯子 print(output) [False True True] >>> x = mindspore.tensor(1, mindspore.bool) >>> y = mindspore.tensor(0, mindspore.bool) >>> output = mindspore.mint.logical_xor(x, y) >>> print(output) True >>> x = True >>> y = mindspore.tensor(0, mindspore.bool) >>> output = vpn free mindspore.mint.logical_xor(x, y) >>> print(output) True >>> x = True >>> y = mindspore.tensor([True, False], mindspore.bool) >>> output = mindspore.mint.logical_xor(x, y) >>> vpn梯子 免费 print(output) [False vpn梯子 True]