tf.bitwise.right_shift(x,y,name=None)
对x按位右移,移动位数y。当y为负时,结果为实现定义
import tensorflow as tf
x = tf.constant(12)
y = tf.constant(2)
r_s = tf.bitwise.right_shift(x,y,name="right_shift")
with tf.Session() as sess:
result = sess.run(r_s)
print(result) #3