mindspore.ops.bitwise_right_shift
- mindspore.ops.bitwise_right_shift(input, other)[源代码]
逐元素对输入 input 进行右移位运算, 移动的位数由 other 指定。
- 参数:
input (Union[Tensor, int, bool]) - 被右移的输入tensor。
other (Union[Tensor, int, bool]) - 右移的位数。
- 返回:
Tensor
- 支持平台:
Ascend
GPU
CPU
样例:
>>> import mindspore >>> input = mindspore.tensor([1, 2, 4, 8]) >>> mindspore.ops.bitwise_right_shift(input, 1) Tensor(shape=[4], dtype=Int64, value= [0, 1, 2, 4])