点击查看 (人工智能) 系列文章
进入虚拟环境
cd demo/venv
.\Scripts\activate
进入python开发环境
python
编写第一个程序
import tensorflow as tf;
tmpString = tf.constant("hello world")
sess = tf.Session()
sess.run(tmpString)
#输出
#b'hello world'
输出说明
字符串前面的“b”表示byte,sess.run执行结果的带编码的字符串,在python中是通过bytes来表示的,所以前面的b只是数据类型的标识。