torch.bitwise_left_shift#
- torch.bitwise_left_shift(input, other, *, out=None) Tensor#
計算
input左移other位的結果。輸入張量必須是整數型別。此運算子支援廣播到公共形狀和型別提升。應用的操作是:
- 引數
- 關鍵字引數
out (Tensor, optional) – 輸出張量。
示例
>>> torch.bitwise_left_shift(torch.tensor([-1, -2, 3], dtype=torch.int8), torch.tensor([1, 0, 3], dtype=torch.int8)) tensor([-2, -2, 24], dtype=torch.int8)