torch.bitwise_right_shift¶
- torch.bitwise_right_shift(input, other, *, out=None) Tensor¶
計算
input按other位元位的右算術移位。輸入張量必須是整數型別。此運算子支援 廣播到公共形狀 和 型別提升。在任何情況下,如果右運算元的值為負或大於等於提升後的左運算元的位元位數,則行為未定義。應用的操作是
- 引數
- 關鍵字引數
out (Tensor, optional) – 輸出張量。
示例
>>> torch.bitwise_right_shift(torch.tensor([-2, -7, 31], dtype=torch.int8), torch.tensor([1, 0, 3], dtype=torch.int8)) tensor([-1, -7, 3], dtype=torch.int8)