安装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。
感谢。