oneflow.bitwise_or¶
-
oneflow.
bitwise_or
()¶ Computes the bitwise OR of input and other. The input tensor must be of integral or Boolean types. For bool tensors, it computes the logical OR.
The interface is consistent with PyTorch. The documentation is referenced from: https://pytorch.org/docs/1.10/generated/torch.bitwise_or.html
- Parameters
input (oneflow.Tensor) – The input Tensor
other (oneflow.Tensor) – The Tensor to compute OR with
- Returns
The output Tensor
- Return type
For example:
>>> import oneflow as flow >>> x = flow.tensor([1, 2, 3]) >>> flow.bitwise_or(x, 4) tensor([5, 6, 7], dtype=oneflow.int64) >>> y = flow.tensor([5, 6, 7]) >>> flow.bitwise_or(x, y) tensor([5, 6, 7], dtype=oneflow.int64)