tensorflow开发 之 hello world

文章目录

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

点击查看 (人工智能) 系列文章


进入虚拟环境

cd demo/venv
.\Scripts\activate

进入python开发环境

python

tensorflow开发 之 hello world_第1张图片

编写第一个程序

import tensorflow as tf;
tmpString = tf.constant("hello world")
sess = tf.Session()
sess.run(tmpString)
#输出
#b'hello world'

tensorflow开发 之 hello world_第2张图片

输出说明

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

你可能感兴趣的:(人工智能,人工智能技术)