logical_or¶
dragon.vm.torch.
logical_or
(
input,
other,
out=None
)[source]¶Compute the element-wise OR logical operation.
\[\text{out} = \text{input} \mathbin{|} \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_or(a, b)) # [False, True, True, True] print(torch.logical_or(c, d)) # [False, True, True, True]
- Parameters:
- input (dragon.vm.torch.Tensor) – The first input tensor.
- other (dragon.vm.torch.Tensor) – The second input tensor.
- out (dragon.vm.torch.Tensor, optional) – The output tensor.
- Returns:
dragon.vm.torch.Tensor – The output tensor.