Tensorflow - hello world程序,预先输出b

时间:2017-02-21 10:54:00

标签: python tensorflow

安装tensorflow并按照tensorflow site

上的说明运行短程序
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

预期结果是 Hello, TensorFlow! 但我得到b'Hello, TensorFlow!'

请注意,结果的不同之处在于b是前置的,而输出本身是单个qoutes。

我有什么遗失的东西吗?我之前在Windows(Anaconda)上做过相同的例子并得到了相同的结果。我只安装了一个CPU。

感谢。

0 个答案:

没有答案