I am looking to reduce the precision of a TensorFlow tensor using bitwise operations. For example, with a NumPy array, this can be achieved by the following,
a = np.array(5) # =[5]
b = np.right_shift(a, 1) # =[2]
c = np.left_shift(b, 1) # =[4]
Is there a way to do this with TensorFlow?