Missed TensorFlow World? Check out the recap. Learn more

tf.compat.v2.size

View source on GitHub
tf.compat.v2.size(
    input,
    out_type=tf.dtypes.int32,
    name=None
)