文章目录

  • 进入虚拟环境
  • 进入python开发环境
  • 编写第一个程序
    • 输出说明

 


进入虚拟环境
cd demo/venv
.\Scripts\activate
进入python开发环境
python

tensorflow开发 之 hello world_人工智能技术

编写第一个程序
import tensorflow as tf;
tmpString = tf.constant("hello world")
sess = tf.Session()
sess.run(tmpString)
#输出
#b'hello world'

tensorflow开发 之 hello world_tensorflow_02

输出说明

  字符串前面的“b”表示byte,sess.run执行结果的带编码的字符串,在python中是通过bytes来表示的,所以前面的b只是数据类型的标识。
tensorflow开发 之 hello world_人工智能_03