tf.compat.as_str

Acts as an alias for the as_text function..

bytes_or_text The input value to be converted. A bytes or unicode object.
encoding Optional string. The encoding to use if bytes_or_text is a bytes object. Defaults to 'utf-8'.

A unicode string.

TypeError If bytes_or_text is not a bytes or unicode object.
UnicodeDecodeError If bytes_or_text is a bytes object and cannot be decoded using the specified encoding.