logical_or

dragon.math.logical_or(
  inputs,
  **kwargs
)[source]

Compute the element-wise OR logical operation.

out=input1input2\text{out} = \text{input1} \mathbin{|} \text{input2}

Examples:

a = dragon.constant([False, True, False, True])
b = dragon.constant([False, True, True, False])
c = dragon.constant([0, 1, 0, 2])
d = dragon.constant([0, 3, 4, 0])
print(dragon.math.logical_or([a, b]))  # [False, True, True, True]
print(dragon.math.logical_or([c, d]))  # [False, True, True, True]
Parameters:
  • inputs (Sequence[dragon.Tensor]) The input1 and input2 tensor.
Returns:

dragon.Tensor The output tensor.