PyTorch torch.bitwise_right_shift function
PyTorch torch reference manual
torch.bitwise_right_shift is a function in PyTorch used for element-wise right shift.
Function definition
torch.bitwise_right_shift(input, other, *, out=None)
Usage examples
Example
import
torch
Right shift example
x
=
torch.
tensor
(
[
2
,
4
,
6
,
8
]
,
dtype
=
torch.
int8
)
result
=
torch.
bitwise_right_shift
(
x
,
1
)
(
result
)