According to the documentation on the Tensorflow website:
https://www.tensorflow.org/api_docs/python/tf/bitwise
tf.bitwise.left_shift(x, y, name=None)
x: A Tensor. Must be one of the following types: int8, int16, int32,
int64, uint8, uint16, uint32, uint64.
y: A Tensor. Must have the same type as x.
name: A name for the operation (optional).
Here's an example:
from tensorflow.python.ops import bitwise_ops
import tensorflow as tf
dtype = tf.int8
lhs = tf.constant([5], dtype=dtype)
rhs = tf.constant([1], dtype=dtype)
right_shift_result = bitwise_ops.right_shift(lhs, rhs)
tf.print(right_shift_result)
left_shift_result = bitwise_ops.left_shift(right_shift_result, rhs)
tf.print(left_shift_result)
Out:
[2]
[4]