TensorFlow and tf.assign () variables with string
1 answer
This confusion arises from the fact that Python 3 uses the Unicode string representation for string literals. A printable representation b'xyz'
means that valueOfX
is a bytes
object . TensorFlow uses strings bytes
as an internal representation of all tensors and variables, and (when using Python 3) implicitly converts str
literals such as 'xyz'
in your code bytes
to using Unicode UTF-8 encoding.
+2
source to share