tensorflow (1) 从hello world开始

 1.先上代码,基础 hello world

#-*- coding:UTF-8 -*-

import tensorflow as tf   #导入模块 

val = tf.constant("hello world")   #定义 tf 常量 val

sess = tf.Session()  #  创建运算图

print(sess.run(val))    #启动运算图 并打印结果

sess.close()   #关闭运算图


猜你喜欢

转载自blog.csdn.net/chen13017535518/article/details/81450465