1.从helloworld谈起

Posted traditional

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了1.从helloworld谈起相关的知识,希望对你有一定的参考价值。

import tensorflow as tf

# 创建一个常量,operation(操作)
hw = tf.constant(‘hello world,i love tensorflow‘)

# 创建一个会话
sess = tf.Session()

# 运行graph(计算图)
print(sess.run(hw))

# 关闭session会话
sess.close()

  

b‘hello world,i love tensorflow‘

  

以上是关于1.从helloworld谈起的主要内容,如果未能解决你的问题,请参考以下文章