In [5]:
import tensorflow as tf

In [6]:
# TF的HelloWorld

# 创建constant op
# 给默认图添加一个op节点
# 
# 返回constant op的构造内容

hello_tf = tf.constant('Hello, TensorFlow!')

In [7]:
# 开始tf session
sess = tf.Session()

In [8]:
# 运行graph
print(sess.run(hello_tf))


b'Hello, TensorFlow!'