torch.bitwise_left_shift¶
- torch.bitwise_left_shift(input, other, *, out=None) Tensor ¶
计算
input
按other
位进行左算术位移的结果。输入张量必须为整数类型。此运算符支持广播到通用形状和类型提升。应用的操作是
- 参数
- 关键字参数
out (Tensor, 可选) – 输出张量。
示例
>>> 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)